add option to add Catch2 for library users
This commit is contained in:
parent
f90241bdd6
commit
847228911f
@ -90,6 +90,7 @@ endif()
|
|||||||
option(FSFW_BUILD_TESTS
|
option(FSFW_BUILD_TESTS
|
||||||
"Build unittest binary in addition to static library. Requires Catch2"
|
"Build unittest binary in addition to static library. Requires Catch2"
|
||||||
OFF)
|
OFF)
|
||||||
|
option(FSFW_ADD_CATCH2 "Add Catch2 unittest framework dependency" OFF)
|
||||||
option(FSFW_CICD_BUILD "Build for CI/CD. This can disable problematic test" OFF)
|
option(FSFW_CICD_BUILD "Build for CI/CD. This can disable problematic test" OFF)
|
||||||
option(FSFW_BUILD_DOCS "Build documentation with Sphinx and Doxygen" OFF)
|
option(FSFW_BUILD_DOCS "Build documentation with Sphinx and Doxygen" OFF)
|
||||||
if(FSFW_BUILD_TESTS)
|
if(FSFW_BUILD_TESTS)
|
||||||
@ -141,9 +142,7 @@ if(FSFW_BUILD_TESTS)
|
|||||||
configure_file(unittests/testcfg/TestsConfig.h.in tests/TestsConfig.h)
|
configure_file(unittests/testcfg/TestsConfig.h.in tests/TestsConfig.h)
|
||||||
|
|
||||||
project(${FSFW_TEST_TGT} CXX C)
|
project(${FSFW_TEST_TGT} CXX C)
|
||||||
add_executable(
|
add_executable(${FSFW_TEST_TGT})
|
||||||
${FSFW_TEST_TGT}
|
|
||||||
)
|
|
||||||
if(IPO_SUPPORTED AND FSFW_ENABLE_IPO)
|
if(IPO_SUPPORTED AND FSFW_ENABLE_IPO)
|
||||||
set_property(TARGET ${FSFW_TEST_TGT} PROPERTY INTERPROCEDURAL_OPTIMIZATION
|
set_property(TARGET ${FSFW_TEST_TGT} PROPERTY INTERPROCEDURAL_OPTIMIZATION
|
||||||
TRUE)
|
TRUE)
|
||||||
|
@ -11,6 +11,6 @@ if(FSFW_ADD_SGP4_PROPAGATOR)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(etl-20.39.4)
|
add_subdirectory(etl-20.39.4)
|
||||||
if(FSFW_BUILD_TESTS)
|
if(FSFW_BUILD_TESTS OR FSFW_ADD_CATCH2)
|
||||||
add_subdirectory(Catch2-3.7.1)
|
add_subdirectory(Catch2-3.7.1)
|
||||||
endif()
|
endif()
|
Loading…
Reference in New Issue
Block a user