Make building individual tests depend on BUILD_SINGLE etc defines
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sun, 13 Sep 2020 19:50:12 +0000 (21:50 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Sep 2020 19:50:12 +0000 (21:50 +0200)
test/CMakeLists.txt

index adeee34..f1f773c 100644 (file)
@@ -3,11 +3,18 @@ include_directories(${PROJECT_BINARY_DIR})
 
 enable_language(Fortran)
 
-set(OpenBLAS_Tests
-  sblat1 sblat2 sblat3
-  dblat1 dblat2 dblat3
-  cblat1 cblat2 cblat3
-  zblat1 zblat2 zblat3)
+if (BUILD_SINGLE)
+       list( APPEND OpenBLAS_Tests  sblat1 sblat2 sblat3)
+endif()
+if (BUILD_DOUBLE)
+       list (APPEND OpenBLAS_Tests dblat1 dblat2 dblat3)
+endif()
+if (BUILD_COMPLEX)
+       list (APPEND OpenBLAS_Tests cblat1 cblat2 cblat3)
+endif()
+if (BUILD_COMPLEX16)
+       list (APPEND OpenBLAS_Tests zblat1 zblat2 zblat3)
+endif()
 
 foreach(test_bin ${OpenBLAS_Tests})
 add_executable(${test_bin} ${test_bin}.f)