Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Cpp
Commits
f4b6dbee
Commit
f4b6dbee
authored
Aug 08, 2018
by
Christoph Richter
Browse files
Link StreamTests target to libraries
parent
7288f669
Pipeline
#67182
passed with stage
in 2 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/generator/cpp/TestsGeneratorCPP.java
View file @
f4b6dbee
...
...
@@ -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
()
{
...
...
src/test/resources/results/cmake/test/BasicPortsMath/CMakeLists.txt
View file @
f4b6dbee
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment