From f3ebaecaa4b79eb602e7089fab8fcdafb102b5e0 Mon Sep 17 00:00:00 2001 From: Peter Spalthoff Date: Mon, 21 Dec 2020 04:55:13 +0900 Subject: [PATCH 1/2] SCALAPACK_BUILD_TESTS option added PBLAS/TIMING also considered TEST --- BLACS/CMakeLists.txt | 4 ++-- CMakeLists.txt | 6 +++++- PBLAS/CMakeLists.txt | 6 ++++-- REDIST/CMakeLists.txt | 4 +++- 4 files changed, 14 insertions(+), 6 deletions(-) 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..0d077292 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,11 @@ 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 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() From ef4666761d3a1ca2ffdd5950d38bdad3549454df Mon Sep 17 00:00:00 2001 From: Peter Spalthoff Date: Mon, 21 Dec 2020 04:55:51 +0900 Subject: [PATCH 2/2] Whitespace fixes Spaces at end of line, automatically deleted by vim/vscode etc. --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d077292..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}) @@ -250,7 +250,7 @@ if(${SCALAPACK_BUILD_TESTS}) 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")