Commit f4b6dbee authored by Christoph Richter's avatar Christoph Richter
Browse files

Link StreamTests target to libraries

parent 7288f669
Pipeline #67182 passed with stage
in 2 minutes and 47 seconds
......@@ -106,8 +106,11 @@ public final class TestsGeneratorCPP {
name = "StreamTests";
CMakeConfig cmake = generator.getCMakeConfig();
cmake.addCMakeCommandEnd("include_directories(test)");
cmake.addCMakeCommandEnd("add_executable(StreamTests test/tests_main.cpp)");
cmake.addCMakeCommandEnd("add_executable(" + name + " test/tests_main.cpp)");
cmake.addCMakeCommandEnd("target_compile_definitions(" + name + " PRIVATE CATCH_CONFIG_MAIN=1 ARMA_DONT_USE_WRAPPER)");
cmake.addCMakeCommandEnd("target_include_directories(" + name + " PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})");
cmake.addCMakeCommandEnd("target_link_libraries(" + name + " PUBLIC ${LIBS})");
cmake.addCMakeCommandEnd("set_target_properties(" + name + " PROPERTIES LINKER_LANGUAGE CXX)");
}
private String getExistingComponentNames() {
......
......@@ -25,5 +25,8 @@ export(TARGETS test_basicPortsMath FILE test_basicPortsMath.cmake)
# additional commands end
include_directories(test)
add_executable(StreamTests test/tests_main.cpp)
add_executable(test_basicPortsMath_StreamTests test/tests_main.cpp)
target_compile_definitions(test_basicPortsMath_StreamTests PRIVATE CATCH_CONFIG_MAIN=1 ARMA_DONT_USE_WRAPPER)
target_include_directories(test_basicPortsMath_StreamTests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(test_basicPortsMath_StreamTests PUBLIC ${LIBS})
set_target_properties(test_basicPortsMath_StreamTests PROPERTIES LINKER_LANGUAGE CXX)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment