Skip to content

Commit b12609e

Browse files
author
fbudin69500
committed
ENH: Build testing repository only if BUILD_TESTING is set to ON
1 parent 70e7c4e commit b12609e

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

BLAS/CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
add_subdirectory(SRC)
2-
add_subdirectory(TESTING)
2+
if( BUILD_TESTING )
3+
add_subdirectory(TESTING)
4+
endif()

CMakeLists.txt

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
cmake_minimum_required(VERSION 2.6)
22
project(CLAPACK C)
3-
enable_testing()
4-
include(CTest)
53

64
if(WIN32 AND NOT CYGWIN)
75
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c)
@@ -11,7 +9,7 @@ else()
119
set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
1210
set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
1311
endif()
14-
enable_testing()
12+
1513
option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
1614
if(NOT USE_BLAS_WRAP)
1715
# _zrotg_ seems to be missing in the wrap header
@@ -21,7 +19,12 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
2119
add_subdirectory(F2CLIBS)
2220
add_subdirectory(BLAS)
2321
add_subdirectory(SRC)
24-
add_subdirectory(TESTING)
22+
if( BUILD_TESTING )
23+
enable_testing()
24+
include(CTest)
25+
add_subdirectory(TESTING)
26+
endif()
27+
2528
set(CLAPACK_VERSION 3.2.1)
2629
set(CPACK_PACKAGE_VERSION_MAJOR 3)
2730
set(CPACK_PACKAGE_VERSION_MINOR 2)

0 commit comments

Comments
 (0)