1 From 834c221936d9c460b44e3a65b6fedfb3193f491b Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sat, 11 Jan 2014 21:33:12 +0100
4 Subject: [PATCH 2/6] cmake: make test build sensitive to BUILD_TESTING
6 This patch prevent from wasting time building the tests if it's our
9 The test build takes a significant amount of time, and the binaries
12 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
14 BLAS/TESTING/CMakeLists.txt | 3 +++
15 CMakeLists.txt | 9 ++++++---
16 TESTING/CMakeLists.txt | 4 ++++
17 3 files changed, 13 insertions(+), 3 deletions(-)
19 diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt
20 index ec2c587..e7dc0b7 100644
21 --- a/BLAS/TESTING/CMakeLists.txt
22 +++ b/BLAS/TESTING/CMakeLists.txt
26 #######################################################################
27 +if(NOT BUILD_TESTING)
31 macro(add_blas_test name src)
32 get_filename_component(baseNAME ${src} NAME_WE)
33 diff --git a/CMakeLists.txt b/CMakeLists.txt
34 index 320ccc6..0a362c0 100644
38 cmake_minimum_required(VERSION 2.6)
43 if(WIN32 AND NOT CYGWIN)
44 @@ -11,7 +10,9 @@ else()
45 set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
46 set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
49 +if(NOT BUILD_TESTING)
52 option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
54 # _zrotg_ seems to be missing in the wrap header
55 @@ -21,7 +22,9 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
56 add_subdirectory(F2CLIBS)
57 add_subdirectory(BLAS)
59 -add_subdirectory(TESTING)
60 +if(NOT BUILD_TESTING)
61 + add_subdirectory(TESTING)
63 set(CLAPACK_VERSION 3.2.1)
64 set(CPACK_PACKAGE_VERSION_MAJOR 3)
65 set(CPACK_PACKAGE_VERSION_MINOR 2)
66 diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt
67 index d59359d..f6b083a 100644
68 --- a/TESTING/CMakeLists.txt
69 +++ b/TESTING/CMakeLists.txt
71 +if(NOT BUILD_TESTING)
76 # string(REPLACE "/STACK:10000000" "/STACK:900000000000000000"
77 # CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")