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

Commit

Permalink
Merge pull request #119 from EOSIO/use-eosio-find-package
Browse files Browse the repository at this point in the history
Use CMake find_package for eosio dependency
  • Loading branch information
arhag authored Nov 6, 2018
2 parents 07a0fb4 + 4e24ee2 commit 6c507c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 103 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ set(EOSIO_CDT_VERSION_MIN "1.3")
set(EOSIO_CDT_VERSION_SOFT_MAX "1.3")
#set(EOSIO_CDT_VERSION_HARD_MAX "")

include(CheckVersion.txt)

find_package(eosio.cdt)

### Check the version of eosio.cdt
Expand Down
90 changes: 0 additions & 90 deletions CheckVersion.txt

This file was deleted.

6 changes: 5 additions & 1 deletion UnitTestsExternalProject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ include(ExternalProject)
find_package(Git REQUIRED)
include(GNUInstallDirs)

string(REPLACE ";" "|" TEST_FRAMEWORK_PATH "${CMAKE_FRAMEWORK_PATH}")
string(REPLACE ";" "|" TEST_MODULE_PATH "${CMAKE_MODULE_PATH}")

ExternalProject_Add(
contracts_unit_tests
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DEOSIO_ROOT=${EOSIO_ROOT}
LIST_SEPARATOR | # Use the alternate list separator
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${TEST_BUILD_TYPE} -DCMAKE_FRAMEWORK_PATH=${TEST_FRAMEWORK_PATH} -DCMAKE_MODULE_PATH=${TEST_MODULE_PATH} -DEOSIO_ROOT=${EOSIO_ROOT}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/tests
BINARY_DIR ${CMAKE_BINARY_DIR}/tests
BUILD_ALWAYS 1
Expand Down
13 changes: 3 additions & 10 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
cmake_minimum_required( VERSION 3.5 )

set(EOSIO_VERSION_MIN "1.3")
set(EOSIO_VERSION_SOFT_MAX "1.3")
set(EOSIO_VERSION_MIN "1.4")
set(EOSIO_VERSION_SOFT_MAX "1.4")
#set(EOSIO_VERSION_HARD_MAX "")

include(../CheckVersion.txt)

if(EOSIO_ROOT STREQUAL "" OR NOT EOSIO_ROOT)
set(EOSIO_ROOT "/usr/local/eosio")
endif()

list(APPEND CMAKE_MODULE_PATH ${EOSIO_ROOT}/lib/cmake)
include(EosioTester)
find_package(eosio)

### Check the version of eosio
set(VERSION_MATCH_ERROR_MSG "")
Expand Down

0 comments on commit 6c507c9

Please sign in to comment.