From 48a4a89ab7ddf852491353b9f6e33232e4ccfbf3 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Tue, 23 Aug 2016 16:40:04 +0200 Subject: [PATCH] Fix global options definition --- .travis.yml | 2 +- CMakeLists.txt | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40b2ece..e8b131e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ script: - cd ${BLD_DIR} # See issue #17 on github dashboard. Once resolved, use -DCBLAS=ON # - cmake -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DLAPACKE=ON ${SRC_DIR} - - cmake -DBUILDNAME:STRING="travis-${TRAVIS_OS_NAME}-${BRANCH}" -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DCBLAS:BOOL=ON -DLAPACKE:BOOL=ON -DLAPACKE_WITH_TMG:BOOL=ON ${SRC_DIR} + - cmake -DBUILDNAME:STRING="travis-${TRAVIS_OS_NAME}-${BRANCH}" -DCMAKE_INSTALL_PREFIX=${INST_DIR} -DCBLAS:BOOL=ON -DLAPACKE:BOOL=ON -DBUILD_TESTING=ON -DLAPACKE_WITH_TMG:BOOL=ON ${SRC_DIR} - ctest -D ExperimentalStart - ctest -D ExperimentalConfigure - ctest -D ExperimentalBuild -j2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 47c8a0a..b41cd6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,17 +151,27 @@ set(SECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/second_${TIME_FUNC}.f) set(DSECOND_SRC ${LAPACK_SOURCE_DIR}/INSTALL/dsecnd_${TIME_FUNC}.f) set(PKG_CONFIG_DIR ${LIBRARY_DIR}/pkgconfig) + +# By default static library +option(BUILD_SHARED_LIBS "Build shared libraries" OFF ) + +option(BUILD_TESTING "Build tests" OFF) + +# deprecated LAPACK routines +option(BUILD_DEPRECATED "Build deprecated routines" OFF) + # -------------------------------------------------- # Precision to build # By default all precisions are generated - +option(BUILD_SINGLE "Build LAPACK Single Precision" ON) +option(BUILD_DOUBLE "Build LAPACK Double Precision" ON) +option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON) +option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON) # -------------------------------------------------- # Subdirectories that need to be processed - option(USE_OPTIMIZED_BLAS "Whether or not to use an optimized BLAS library instead of included netlib BLAS" OFF) - # Check the usage of the user provided BLAS libraries if(BLAS_LIBRARIES) include(CheckFortranFunctionExists) @@ -246,10 +256,6 @@ endif () if(NOT LATESTLAPACK_FOUND) message(STATUS "Using supplied NETLIB LAPACK implementation") set( LAPACK_LIBRARIES lapack ) - option(BUILD_SINGLE "Build LAPACK Single Precision" ON) - option(BUILD_DOUBLE "Build LAPACK Double Precision" ON) - option(BUILD_COMPLEX "Build LAPACK Complex Precision" ON) - option(BUILD_COMPLEX16 "Build LAPACK Double Complex Precision" ON) add_subdirectory(SRC) else() set( CMAKE_EXE_LINKER_FLAGS @@ -268,9 +274,6 @@ if(BUILD_TESTING) add_subdirectory(TESTING) endif() -# deprecated LAPACK routines -option(BUILD_DEPRECATED "Build deprecated routines" OFF) - # -------------------------------------------------- # LAPACKE option(LAPACKE "Build LAPACKE" OFF) @@ -319,10 +322,6 @@ include(CPack) # -------------------------------------------------- -# By default static library -option(BUILD_SHARED_LIBS "Build shared libraries" OFF ) -option(BUILD_STATIC_LIBS "Build static libraries" ON ) -#option(BUILD_SHARED_LIBS "Build shared libraries" ON ) if(NOT BLAS_FOUND) set(ALL_TARGETS ${ALL_TARGETS} blas) -- 2.7.4