CMake: Simplify test tools config

This commit is contained in:
Paweł Bylica 2017-08-16 13:38:18 +02:00
parent 6f72025ee7
commit 397a72107a
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF

View File

@ -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})