@@ -8,6 +8,15 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
88 set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Coverage" )
99endif ()
1010
11+ string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
12+ if (${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE" )
13+ message (STATUS "Adding coverage" )
14+ find_package (codecov )
15+ endif ()
16+
17+ # By default static library
18+ option (BUILD_SHARED_LIBS "Build shared libraries" OFF )
19+
1120project (LAPACK Fortran C )
1221
1322set (LAPACK_MAJOR_VERSION 3)
@@ -111,12 +120,13 @@ set(PKG_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
111120
112121# --------------------------------------------------
113122# Testing
114-
123+ option ( BUILD_TESTING "Build tests" OFF )
115124enable_testing ()
116125include (CTest )
117126enable_testing ()
118- # --------------------------------------------------
127+ message ( STATUS "Build tests: ${BUILD_TESTING} " )
119128
129+ # --------------------------------------------------
120130# Organize output files. On Windows this also keeps .dll files next
121131# to the .exe files that need them, making tests easy to run.
122132set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR} /bin)
@@ -128,12 +138,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/lib)
128138include (CheckLAPACKCompilerFlags )
129139CheckLAPACKCompilerFlags ()
130140
131- string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
132- if (${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE" )
133- message (STATUS "Adding coverage" )
134- find_package (codecov )
135- endif ()
136-
137141# --------------------------------------------------
138142# Check second function
139143
@@ -149,12 +153,6 @@ message(STATUS "--> Will use second_${TIME_FUNC}.f and dsecnd_${TIME_FUNC}.f as
149153set (SECOND_SRC ${LAPACK_SOURCE_DIR} /INSTALL/second_${TIME_FUNC} .f)
150154set (DSECOND_SRC ${LAPACK_SOURCE_DIR} /INSTALL/dsecnd_${TIME_FUNC} .f)
151155
152- # By default static library
153- option (BUILD_SHARED_LIBS "Build shared libraries" OFF )
154-
155- option (BUILD_TESTING "Build tests" OFF )
156- message (STATUS "Build tests: ${BUILD_TESTING} " )
157-
158156# deprecated LAPACK and LAPACKE routines
159157option (BUILD_DEPRECATED "Build deprecated routines" OFF )
160158message (STATUS "Build deprecated routines: ${BUILD_DEPRECATED} " )
0 commit comments