1
0
Fork 0

TestSuite: Addition of the SYSTEM_CPPUNIT option for distributors.

This is to allow for selecting between a system installed version of CppUnit or
the version bundled with flightgear.
This commit is contained in:
Edward d'Auvergne 2018-03-06 10:24:13 +01:00
parent f4ee276472
commit 3c73600237
2 changed files with 11 additions and 7 deletions

View file

@ -29,3 +29,7 @@ endif()
if (ENABLE_HID_INPUT) if (ENABLE_HID_INPUT)
add_subdirectory(hidapi) add_subdirectory(hidapi)
endif() endif()
if (NOT SYSTEM_CPPUNIT)
add_subdirectory(cppunit)
endif()

View file

@ -160,6 +160,11 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
if(HTS_ENGINE_FOUND) if(HTS_ENGINE_FOUND)
set(SYSTEM_HTS_ENGINE_DEFAULT 1) set(SYSTEM_HTS_ENGINE_DEFAULT 1)
endif() endif()
find_package(CppUnit)
if (CPPUNIT_FOUND)
set(SYSTEM_CPPUNIT_DEFAULT 1)
endif()
endif() endif()
find_package(Git) find_package(Git)
@ -191,6 +196,7 @@ option(SYSTEM_SPEEX "Set to ON to build IAXClient with the system's speex a
option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM library" ${SYSTEM_GSM_DEFAULT}) option(SYSTEM_GSM "Set to ON to build IAXClient with the system's GSM library" ${SYSTEM_GSM_DEFAULT})
option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT}) option(SYSTEM_FLITE "Set to ON to build Flightgear with the system's Flite library" ${SYSTEM_FLITE_DEFAULT})
option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT}) option(SYSTEM_HTS_ENGINE "Set to ON to build Flightgear with the system's HTS Engine library" ${SYSTEM_HTS_ENGINE_DEFAULT})
option(SYSTEM_CPPUNIT "Set to ON to build Flightgear with the system's CppUnit library" ${SYSTEM_CPPUNIT_DEFAULT})
# additional utilities # additional utilities
option(ENABLE_FGELEV "Set to ON to build the fgelev application (default)" ON) option(ENABLE_FGELEV "Set to ON to build the fgelev application (default)" ON)
@ -603,10 +609,4 @@ ADD_CUSTOM_TARGET(uninstall
# The test suite. # The test suite.
find_package(CppUnit) add_subdirectory(test_suite EXCLUDE_FROM_ALL)
if (CPPUNIT_FOUND)
message(STATUS "CppUnit found.")
add_subdirectory(test_suite EXCLUDE_FROM_ALL)
else()
message(STATUS "CppUnit not found.")
endif()