Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Commit 6c507c9

Browse files
authored
Merge pull request #119 from EOSIO/use-eosio-find-package
Use CMake find_package for eosio dependency
2 parents 07a0fb4 + 4e24ee2 commit 6c507c9

File tree

4 files changed

+8
-103
lines changed

4 files changed

+8
-103
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ set(EOSIO_CDT_VERSION_MIN "1.3")
55
set(EOSIO_CDT_VERSION_SOFT_MAX "1.3")
66
#set(EOSIO_CDT_VERSION_HARD_MAX "")
77

8-
include(CheckVersion.txt)
9-
108
find_package(eosio.cdt)
119

1210
### Check the version of eosio.cdt

CheckVersion.txt

Lines changed: 0 additions & 90 deletions
This file was deleted.

UnitTestsExternalProject.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ include(ExternalProject)
22
find_package(Git REQUIRED)
33
include(GNUInstallDirs)
44

5+
string(REPLACE ";" "|" TEST_FRAMEWORK_PATH "${CMAKE_FRAMEWORK_PATH}")
6+
string(REPLACE ";" "|" TEST_MODULE_PATH "${CMAKE_MODULE_PATH}")
7+
58
ExternalProject_Add(
69
contracts_unit_tests
7-
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DEOSIO_ROOT=${EOSIO_ROOT}
10+
LIST_SEPARATOR | # Use the alternate list separator
11+
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DCMAKE_FRAMEWORK_PATH=${TEST_FRAMEWORK_PATH} -DCMAKE_MODULE_PATH=${TEST_MODULE_PATH} -DEOSIO_ROOT=${EOSIO_ROOT}
812
SOURCE_DIR ${CMAKE_SOURCE_DIR}/tests
913
BINARY_DIR ${CMAKE_BINARY_DIR}/tests
1014
BUILD_ALWAYS 1

tests/CMakeLists.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
cmake_minimum_required( VERSION 3.5 )
22

3-
set(EOSIO_VERSION_MIN "1.3")
4-
set(EOSIO_VERSION_SOFT_MAX "1.3")
3+
set(EOSIO_VERSION_MIN "1.4")
4+
set(EOSIO_VERSION_SOFT_MAX "1.4")
55
#set(EOSIO_VERSION_HARD_MAX "")
66

7-
include(../CheckVersion.txt)
8-
9-
if(EOSIO_ROOT STREQUAL "" OR NOT EOSIO_ROOT)
10-
set(EOSIO_ROOT "/usr/local/eosio")
11-
endif()
12-
13-
list(APPEND CMAKE_MODULE_PATH ${EOSIO_ROOT}/lib/cmake)
14-
include(EosioTester)
7+
find_package(eosio)
158

169
### Check the version of eosio
1710
set(VERSION_MATCH_ERROR_MSG "")

0 commit comments

Comments
 (0)