diff --git a/BLACS/CMakeLists.txt b/BLACS/CMakeLists.txt index 18058e20..fd4633c2 100644 --- a/BLACS/CMakeLists.txt +++ b/BLACS/CMakeLists.txt @@ -1,4 +1,4 @@ add_subdirectory(SRC) -if(BUILD_TESTING) +if(${SCALAPACK_BUILD_TESTING}) add_subdirectory(TESTING) -endif(BUILD_TESTING) +endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 638dbdca..639a1aaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8) project(SCALAPACK C Fortran) # Configure the warning and code coverage suppression file -configure_file( +configure_file( "${SCALAPACK_SOURCE_DIR}/CMAKE/CTestCustom.cmake.in" "${SCALAPACK_BINARY_DIR}/CTestCustom.cmake" COPYONLY @@ -48,8 +48,8 @@ if (MPI_FOUND) PATH_SUFFIXES bin DOC "MPI Fortran compiler.") MARK_AS_ADVANCED(MPI_Fortran_COMPILER) - - + + if ("${MPI_Fortran_COMPILER}" STREQUAL "MPI_Fortran_COMPILER-NOTFOUND") message(ERROR "--> MPI Fortran Compiler NOT FOUND (please set MPI_BASE_DIR accordingly") @@ -59,7 +59,7 @@ if (MPI_FOUND) SET(CMAKE_Fortran_COMPILER "${MPI_Fortran_COMPILER}") message(STATUS "--> Fortran Compiler : ${CMAKE_Fortran_COMPILER}") endif() - + else() message(STATUS "Found MPI_LIBRARY : ${MPI_FOUND} ") set(MPI_BASE_DIR ${MPI_BASE_DIR} CACHE PATH "MPI Path") @@ -184,7 +184,7 @@ OPTION(BUILD_STATIC_LIBS "Build static libraries" ON ) # -------------------------------------------------- # Subdirectories that need to be processed - + macro(append_subdir_files variable dirname) get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable}) foreach(depfile ${holder}) @@ -243,10 +243,14 @@ else (UNIX) # Need to separate Fortran and C Code scalapack_install_library(scalapack) scalapack_install_library(scalapack-F) endif (UNIX) -add_subdirectory(TESTING) + +option(SCALAPACK_BUILD_TESTS "Build all tests of the ScaLAPACK library" ON) +if(${SCALAPACK_BUILD_TESTS}) + add_subdirectory(TESTING) +endif() # -------------------------------------------------- -# CPACK Packaging +# CPACK Packaging SET(CPACK_PACKAGE_NAME "ScaLAPACK") SET(CPACK_PACKAGE_VENDOR "University of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd") diff --git a/PBLAS/CMakeLists.txt b/PBLAS/CMakeLists.txt index 10b8b009..e6b69405 100644 --- a/PBLAS/CMakeLists.txt +++ b/PBLAS/CMakeLists.txt @@ -1,3 +1,5 @@ add_subdirectory(SRC) -add_subdirectory(TESTING) -add_subdirectory(TIMING) +if(${SCALAPACK_BUILD_TESTING}) + add_subdirectory(TESTING) + add_subdirectory(TIMING) +endif() diff --git a/REDIST/CMakeLists.txt b/REDIST/CMakeLists.txt index 3387cd14..fd4633c2 100644 --- a/REDIST/CMakeLists.txt +++ b/REDIST/CMakeLists.txt @@ -1,2 +1,4 @@ add_subdirectory(SRC) -add_subdirectory(TESTING) +if(${SCALAPACK_BUILD_TESTING}) + add_subdirectory(TESTING) +endif()