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

two fixes for eosio tester cmake modules #8015

Merged
merged 2 commits into from
Oct 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
DOC "Path to the GMP library"
)

set(EOSIO_WASM_RUNTIMES @EOSIO_WASM_RUNTIMES@)
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
set(WRAP_MAIN "-Wl,-wrap=main")
endif()

macro(add_eosio_test_executable test_name)
add_executable( ${test_name} ${ARGN} )
target_link_libraries( ${test_name}
${LLVM_LIBS}
${libtester}
${libchain}
${libfc}
Expand All @@ -103,7 +107,12 @@ macro(add_eosio_test_executable test_name)
${Boost_CHRONO_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
${Boost_DATE_TIME_LIBRARY}

${LLVM_LIBS}

${PLATFORM_SPECIFIC_LIBS}

${WRAP_MAIN}
)

target_include_directories( ${test_name} PUBLIC
Expand Down
11 changes: 10 additions & 1 deletion CMakeModules/EosioTesterBuild.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,14 @@ find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
DOC "Path to the GMP library"
)

set(EOSIO_WASM_RUNTIMES @EOSIO_WASM_RUNTIMES@)
if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
set(WRAP_MAIN "-Wl,-wrap=main")
endif()

macro(add_eosio_test_executable test_name)
add_executable( ${test_name} ${ARGN} )
target_link_libraries( ${test_name}
${LLVM_LIBS}
${libtester}
${libchain}
${libfc}
Expand All @@ -102,7 +106,12 @@ macro(add_eosio_test_executable test_name)
${Boost_CHRONO_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
${Boost_DATE_TIME_LIBRARY}

${LLVM_LIBS}

${PLATFORM_SPECIFIC_LIBS}

${WRAP_MAIN}
)

target_include_directories( ${test_name} PUBLIC
Expand Down