File tree Expand file tree Collapse file tree 1 file changed +25
-20
lines changed
Expand file tree Collapse file tree 1 file changed +25
-20
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ set( CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install"
99
1010project (bspline-fortran NONE)
1111
12+ # Define build options
13+ option (BSPLINE_BUILD_TESTING "Build the test programs" ON )
14+
1215# Real and Integer kinds
1316SET (BSPLINE_REAL_KIND "REAL64" CACHE STRING "Real kind parameter" )
1417SET_PROPERTY (CACHE BSPLINE_REAL_KIND PROPERTY STRINGS REAL32 REAL64 REAL128)
@@ -103,23 +106,25 @@ if(MSVC_IDE)
103106 SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fpp" )
104107endif ()
105108
106- # Add ctest commands, to build all test programs (that do not depend on pyplot_module)
107- # Thus, tests can all be run with `make test`
108- enable_testing ()
109- foreach (prog_name
110- # bspline_extrap_test
111- bspline_test_2
112- bspline_test
113- # dbint4_test
114- # knot_tests
115- # speed_test
116- # speed_test_oo
117- stack_size_test_oo
118- test_integrate
119- test_oo
120- test_regrid)
121- add_executable (${prog_name} test /${prog_name} .f90)
122- target_link_libraries (${prog_name} ${LIB_NAME} -static )
123- add_test (NAME ${prog_name}
124- COMMAND ${prog_name} )
125- endforeach ()
109+ if (BSPLINE_BUILD_TESTING)
110+ # Add ctest commands, to build all test programs (that do not depend on pyplot_module)
111+ # Thus, tests can all be run with `make test`
112+ enable_testing ()
113+ foreach (prog_name
114+ # bspline_extrap_test
115+ bspline_test_2
116+ bspline_test
117+ # dbint4_test
118+ # knot_tests
119+ # speed_test
120+ # speed_test_oo
121+ stack_size_test_oo
122+ test_integrate
123+ test_oo
124+ test_regrid)
125+ add_executable (${prog_name} test /${prog_name} .f90)
126+ target_link_libraries (${prog_name} ${LIB_NAME} -static )
127+ add_test (NAME ${prog_name}
128+ COMMAND ${prog_name} )
129+ endforeach ()
130+ endif ()
You can’t perform that action at this time.
0 commit comments