Skip to content
Snippets Groups Projects
Commit a659384b authored by Christopher Ruwisch's avatar Christopher Ruwisch Committed by Kristina Mazur
Browse files

[Fix] CMake using testflag enabled

parent 1d915d70
No related branches found
No related tags found
5 merge requests!263Apply 1 suggestion(s) to 1 file(s),!261Reintruduced automatic flight condition selection,!245Apply 1 suggestion(s) to 1 file(s),!233Initial open source version,!72[Fix] CMake using testflag enabled
......@@ -61,10 +61,9 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
# Download LiftingLine
add_subdirectory(LiftingLine)
......
......@@ -44,7 +44,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_BLACKBOXTESTS OR BUILD_UNITTESTS)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -88,7 +88,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_BLACKBOXTESTS OR BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -13,15 +13,13 @@ if (BUILD_BLACKBOXTESTS)
# Link the test executable against UNICADO libs and gtest
target_link_libraries(blackbox_${MODULE_NAME}
PRIVATE
UnicadoLibs::runtimeInfo
UnicadoLibs::standardFiles
UnicadoLibs::aixml
UnicadoLibs::unitConversion
UnicadoLibs::aircraftGeometry
UnicadoLibs::engine
UnicadoLibs::moduleBasics
UnicadoLibs::svgPlot
UnicadoLibs::atmosphere
UnicadoLibs::runtimeInfo
UnicadoLibs::standardFiles
UnicadoLibs::aixml
UnicadoLibs::unitConversion
UnicadoLibs::engine
UnicadoLibs::moduleBasics
UnicadoLibs::atmosphere
Matplot++::matplot
GTest::gtest
UnicadoLibs::blackboxTest
......
......@@ -85,7 +85,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -45,7 +45,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}$<0:>
)
# Add the tests if enabled
if(BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -48,7 +48,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_BLACKBOXTESTS OR BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -55,7 +55,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
......@@ -85,7 +85,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES
)
# Add the tests if enabled
if(BUILD_UNITTEST)
if((BUILD_UNITTEST OR BUILD_BLACKBOXTESTS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment