diff options
author | Paweł Bylica <chfast@gmail.com> | 2017-08-16 19:38:18 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2017-08-18 19:32:36 +0800 |
commit | 397a72107abbe691d9e04dcb6bcc0eb2b2a583fb (patch) | |
tree | c93d6ad5f7b9e5d7bdd7341793dca67a169c901f | |
parent | 6f72025ee74d6255d40905ea09fa8a8dddf49605 (diff) | |
download | dexon-solidity-397a72107abbe691d9e04dcb6bcc0eb2b2a583fb.tar.gz dexon-solidity-397a72107abbe691d9e04dcb6bcc0eb2b2a583fb.tar.zst dexon-solidity-397a72107abbe691d9e04dcb6bcc0eb2b2a583fb.zip |
CMake: Simplify test tools config
-rw-r--r-- | test/CMakeLists.txt | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3578f497..92218f1d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,26 +1,9 @@ -cmake_policy(SET CMP0015 NEW) +file(GLOB_RECURSE sources "*.cpp") +list(REMOVE_ITEM sources "${CMAKE_CURRENT_SOURCE_DIR}/fuzzer.cpp") +file(GLOB_RECURSE headers "*.h") -aux_source_directory(. SRC_LIST) -aux_source_directory(libdevcore SRC_LIST) -aux_source_directory(libevmasm SRC_LIST) -aux_source_directory(libsolidity SRC_LIST) -aux_source_directory(libjulia SRC_LIST) -aux_source_directory(contracts SRC_LIST) -aux_source_directory(liblll SRC_LIST) -aux_source_directory(libjulia SRC_LIST) - -list(REMOVE_ITEM SRC_LIST "./fuzzer.cpp") - -get_filename_component(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) - -file(GLOB HEADERS "*.h" "*/*.h") -set(EXECUTABLE soltest) -eth_simple_add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) - -eth_use(${EXECUTABLE} REQUIRED Solidity::solidity Solidity::lll) - -include_directories(BEFORE ..) -target_link_libraries(${EXECUTABLE} soljson devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) +add_executable(soltest ${sources} ${headers}) +target_link_libraries(soltest PRIVATE soljson solidity lll ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES}) add_executable(solfuzzer fuzzer.cpp) target_link_libraries(solfuzzer soljson evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES}) |