Link stacktrace to library instead of test executable.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
34362a2cd7
commit
0a2acc1eea
|
@ -26,12 +26,8 @@ if (TESTS)
|
|||
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
||||
# And create an executable from it. Also include catch.hpp.
|
||||
add_executable(ArbutilsTests ${TEST_FILES} extern/catch.hpp)
|
||||
set(LINKS Arbutils)
|
||||
if (NOT WINDOWS)
|
||||
set(LINKS ${LINKS} -lbfd -ldl)
|
||||
endif()
|
||||
# And finally link the library to the executable.
|
||||
target_link_libraries(ArbutilsTests ${LINKS})
|
||||
target_link_libraries(ArbutilsTests Arbutils)
|
||||
# Add a compilation definition to the code that we are building a test build.
|
||||
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
|
||||
endif ()
|
||||
|
@ -45,10 +41,15 @@ if (WINDOWS)
|
|||
add_compile_options(-m64)
|
||||
endif (WINDOWS)
|
||||
|
||||
set(LINKS)
|
||||
if (NOT WINDOWS)
|
||||
set(LINKS ${LINKS} -lbfd -ldl)
|
||||
endif()
|
||||
# If we want to link the C and C++ library statically, link those as well.
|
||||
if (STATICC)
|
||||
target_link_libraries(Arbutils -static-libgcc -static-libstdc++)
|
||||
set(LINKS ${LINKS} -static-libgcc -static-libstdc++)
|
||||
endif(STATICC)
|
||||
target_link_libraries(Arbutils ${LINKS})
|
||||
|
||||
# If we aren't building for Windows, also include an option for installing on unix.
|
||||
if (NOT WINDOWS)
|
||||
|
|
Loading…
Reference in New Issue