@@ -24,6 +24,8 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
24
24
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage" )
25
25
endif ()
26
26
27
+ # Coverage
28
+ set (_is_coverage_build 0 )
27
29
set (_msg "Checking if build type is 'Coverage'" )
28
30
message (STATUS "${_msg} " )
29
31
if (NOT CMAKE_CONFIGURATION_TYPES )
@@ -108,16 +110,8 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "Compaq")
108
110
endif ()
109
111
endif ()
110
112
111
- # Get Python
112
- message (STATUS "Looking for Python greater than 2.6 - ${PYTHONINTERP_FOUND} " )
113
- find_package (PythonInterp 2.7 ) # lapack_testing.py uses features from python 2.7 and greater
114
- if (PYTHONINTERP_FOUND )
115
- message (STATUS "Using Python version ${PYTHON_VERSION_STRING} " )
116
- else ()
117
- message (STATUS "No suitable Python version found, so skipping summary tests." )
118
- endif ()
119
- # --------------------------------------------------
120
113
114
+ # --------------------------------------------------
121
115
set (LAPACK_INSTALL_EXPORT_NAME lapack-targets )
122
116
123
117
macro (lapack_install_library lib )
@@ -133,12 +127,22 @@ set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
133
127
134
128
# --------------------------------------------------
135
129
# Testing
136
- option (BUILD_TESTING "Build tests" OFF )
137
- enable_testing ()
130
+ option (BUILD_TESTING "Build tests" ${_is_coverage_build} )
138
131
include (CTest )
139
- enable_testing ()
140
132
message (STATUS "Build tests: ${BUILD_TESTING} " )
141
133
134
+ # lapack_testing.py uses features from python 2.7 and greater
135
+ if (BUILD_TESTING )
136
+ set (_msg "Looking for Python >= 2.7 needed for summary tests" )
137
+ message (STATUS "${_msg} " )
138
+ find_package (PythonInterp 2.7 QUIET )
139
+ if (PYTHONINTERP_FOUND )
140
+ message (STATUS "${_msg} - found (${PYTHON_VERSION_STRING} )" )
141
+ else ()
142
+ message (STATUS "${_msg} - not found (skipping summary tests)" )
143
+ endif ()
144
+ endif ()
145
+
142
146
# --------------------------------------------------
143
147
# Organize output files. On Windows this also keeps .dll files next
144
148
# to the .exe files that need them, making tests easy to run.
0 commit comments