File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.14...3.28)
22project (GKlib LANGUAGES C)
3+ enable_testing ()
4+
5+ option (BUILD_TESTING "Build tests" ON )
36
47option (BUILD_SHARED_LIBS "Build shared libraries (.dll/.so) instead of static ones (.lib/.a)" OFF )
58
@@ -30,7 +33,9 @@ $<$<BOOL:${UNIX}>:m>
3033$<$<BOOL :${OPENMP} >:OpenMP::OpenMP_C>
3134)
3235
36+ if (BUILD_TESTING)
3337add_subdirectory (test )
38+ endif ()
3439
3540install (TARGETS GKlib)
3641install (FILES ${GKlib_includes} TYPE INCLUDE )
Original file line number Diff line number Diff line change @@ -11,9 +11,12 @@ add_executable(cmpnbrs cmpnbrs.c)
1111add_executable (splatt2svd splatt2svd.c)
1212add_executable (gkuniq gkuniq.c)
1313
14- foreach (prog strings gksort fis gkrw gkgraph csrcnv grKx m2mnbrs cmpnbrs splatt2svd gkuniq)
15- target_link_libraries (${prog} GKlib)
16- endforeach (prog)
14+ foreach (prog IN ITEMS strings gksort fis gkrw gkgraph csrcnv grKx m2mnbrs cmpnbrs splatt2svd gkuniq)
15+ target_link_libraries (${prog} PRIVATE GKlib)
16+ if (NOT prog MATCHES "m2mnbrs|cmpnbrs|splatt2svd" )
17+ add_test (NAME ${prog} COMMAND ${prog} )
18+ endif ()
19+ endforeach ()
1720
1821# Install a subset of them
19- install (TARGETS csrcnv RUNTIME DESTINATION bin )
22+ install (TARGETS csrcnv)
You can’t perform that action at this time.
0 commit comments