summaryrefslogtreecommitdiffstats
path: root/package/clapack/0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch
blob: eac4164f5df1c2f8e3ca0ef21a403798d96d5456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
From 834c221936d9c460b44e3a65b6fedfb3193f491b Mon Sep 17 00:00:00 2001
From: Samuel Martin <s.martin49@gmail.com>
Date: Sat, 11 Jan 2014 21:33:12 +0100
Subject: [PATCH 2/6] cmake: make test build sensitive to BUILD_TESTING

This patch prevent from wasting time building the tests if it's our
wish.

The test build takes a significant amount of time, and the binaries
are not installed.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 BLAS/TESTING/CMakeLists.txt | 3 +++
 CMakeLists.txt              | 9 ++++++---
 TESTING/CMakeLists.txt      | 4 ++++
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt
index ec2c587..e7dc0b7 100644
--- a/BLAS/TESTING/CMakeLists.txt
+++ b/BLAS/TESTING/CMakeLists.txt
@@ -25,6 +25,9 @@
 #       make single FRC=FRC
 #
 #######################################################################
+if(NOT BUILD_TESTING)
+  return()
+endif()
 
 macro(add_blas_test name src)
   get_filename_component(baseNAME ${src} NAME_WE)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 320ccc6..0a362c0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,5 @@
 cmake_minimum_required(VERSION 2.6)
 project(CLAPACK C)
-enable_testing()
 include(CTest)
 
 if(WIN32 AND NOT CYGWIN)
@@ -11,7 +10,9 @@ else()
   set(SECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/second.c)
   set(DSECOND_SRC  ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c)
 endif()
-enable_testing()
+if(NOT BUILD_TESTING)
+  enable_testing()
+endif()
 option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF)
 if(NOT USE_BLAS_WRAP)
 # _zrotg_ seems to be missing in the wrap header
@@ -21,7 +22,9 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE)
 add_subdirectory(F2CLIBS)
 add_subdirectory(BLAS)
 add_subdirectory(SRC)
-add_subdirectory(TESTING)
+if(NOT BUILD_TESTING)
+  add_subdirectory(TESTING)
+endif()
 set(CLAPACK_VERSION 3.2.1)
 set(CPACK_PACKAGE_VERSION_MAJOR 3)
 set(CPACK_PACKAGE_VERSION_MINOR 2)
diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt
index d59359d..f6b083a 100644
--- a/TESTING/CMakeLists.txt
+++ b/TESTING/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(NOT BUILD_TESTING)
+  return()
+endif()
+
 if(MSVC_VERSION)
 #  string(REPLACE "/STACK:10000000" "/STACK:900000000000000000"
 #    CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
-- 
1.8.5.3

OpenPOWER on IntegriCloud