@@ -13,8 +13,6 @@ project("NumCpp"
1313 LANGUAGES CXX
1414)
1515
16- enable_testing ()
17-
1816message (STATUS "Building ${PROJECT_NAME} version ${VERSION_STRING} " )
1917
2018if (NOT CMAKE_BUILD_TYPE )
@@ -30,10 +28,12 @@ message(STATUS "Compiling with C++ standard: ${CMAKE_CXX_STANDARD}")
3028set (CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "" ) # works
3129
3230option (BUILD_ALL "Build All targets" OFF )
31+ option (BUILD_ALL_NON_PYTHON "Build All targets except the python bindings for pytest" OFF )
3332option (BUILD_DOCS "Build the doxygen documentation" OFF )
3433option (BUILD_TESTS "Build the unit tests" OFF )
3534option (BUILD_MULTIPLE_TEST "Build the multiple translation unit test" OFF )
3635option (BUILD_CPPCHECK_TEST "Build the cppcheck test" OFF )
36+ option (BUILD_GTEST "Build the gtest tests" OFF )
3737option (BUILD_EXAMPLE_ALL "Build all of the examples" OFF )
3838option (BUILD_EXAMPLE_GAUSS_NEWTON_NLLS "Build the Gauss-Newton NLLS example" OFF )
3939option (BUILD_EXAMPLE_INTERFACE_WITH_EIGEN "Build the Interface with Eigen example" OFF )
@@ -44,10 +44,15 @@ option(NUMCPP_NO_USE_BOOST "Don't use the boost libraries" OFF)
4444option (NUMCPP_USE_MULTITHREAD "Enable multithreading" OFF )
4545
4646if (BUILD_ALL)
47- set (BUILD_DOCS ON )
47+ set (BUILD_ALL_NON_PYTHON ON )
4848 set (BUILD_TESTS ON )
49+ endif ()
50+
51+ if (BUILD_ALL_NON_PYTHON)
52+ set (BUILD_DOCS ON )
4953 set (BUILD_MULTIPLE_TEST ON )
5054 set (BUILD_CPPCHECK_TEST ON )
55+ set (BUILD_GTEST ON )
5156 set (BUILD_EXAMPLE_ALL ON )
5257endif ()
5358
@@ -134,6 +139,7 @@ get_filename_component(NUMCPP_INCLUDES ./include ABSOLUTE)
134139set (OUTPUT_BINARY_DIR ${PROJECT_SOURCE_DIR} /bin/$<0:>)
135140
136141if (BUILD_TESTS OR BUILD_MULTIPLE_TEST OR BUILD_CPPCHECK_TEST)
142+ enable_testing ()
137143 add_subdirectory (test )
138144endif ()
139145
0 commit comments