1
0
Fork 0

Add CMake option to disable building test applications.

This commit is contained in:
ThorstenB 2012-04-08 18:49:11 +02:00
parent b920fc27b1
commit efa18fae1e
2 changed files with 6 additions and 2 deletions

View file

@ -111,6 +111,7 @@ option(ENABLE_LIBSVN "Set to ON to build FlightGear/terrasync with libsvncli
option(ENABLE_RTI "Set to ON to build SimGear with RTI support" OFF) option(ENABLE_RTI "Set to ON to build SimGear with RTI support" OFF)
option(WITH_FGPANEL "Set to ON to build the fgpanel application" ON) option(WITH_FGPANEL "Set to ON to build the fgpanel application" ON)
option(JPEG_FACTORY "Enable JPEG-factory support" OFF) option(JPEG_FACTORY "Enable JPEG-factory support" OFF)
option(ENABLE_TESTS "Set to OFF to disable building test applications" ON)
if (MSVC) if (MSVC)
GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH) GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)

View file

@ -1,7 +1,7 @@
include(FlightGearComponent) include(FlightGearComponent)
set(COMMON set(COMMON
Airplane.cpp Airplane.cpp
Atmosphere.cpp Atmosphere.cpp
ControlMap.cpp ControlMap.cpp
FGFDM.cpp FGFDM.cpp
@ -34,9 +34,9 @@ set(SOURCES
FGGround.cpp FGGround.cpp
) )
flightgear_component(YASim "${SOURCES}") flightgear_component(YASim "${SOURCES}")
if(ENABLE_TESTS)
add_executable(yasim yasim-test.cpp ${COMMON}) add_executable(yasim yasim-test.cpp ${COMMON})
add_executable(yasim-proptest proptest.cpp ${COMMON}) add_executable(yasim-proptest proptest.cpp ${COMMON})
@ -49,3 +49,6 @@ target_link_libraries(yasim-proptest
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}) ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES})
install(TARGETS yasim yasim-proptest RUNTIME DESTINATION bin) install(TARGETS yasim yasim-proptest RUNTIME DESTINATION bin)
endif(ENABLE_TESTS)