Skip to content

Commit

Permalink
Update CMake options.
Browse files Browse the repository at this point in the history
  • Loading branch information
emfomy committed Aug 16, 2018
1 parent 8216f92 commit 03884ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
42 changes: 22 additions & 20 deletions cmake/display.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,75 +76,77 @@ disp("Build type: " "${CMAKE_BUILD_TYPE}")
message(STATUS "")

# Display compilers
disp("Use C Compiler: " "${CMAKE_C_COMPILER}")
disp("Use C++ Compiler: " "${CMAKE_CXX_COMPILER}")
disp("C compiler: " "${CMAKE_C_COMPILER}")
disp("C++ compiler: " "${CMAKE_CXX_COMPILER}")

message(STATUS "")

string(TOUPPER "CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}" cflag_build)
string(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" cxxflag_build)

disp("Use C flags: " "${CMAKE_C_FLAGS} ${${cflag_build}}")
disp("Use C++ flags: " "${CMAKE_CXX_FLAGS} ${${cxxflag_build}}")
disp("Use libraries: " "${DEFAULT_LIBRARY}")
disp("C flags: " "${CMAKE_C_FLAGS} ${${cflag_build}}")
disp("C++ flags: " "${CMAKE_CXX_FLAGS} ${${cxxflag_build}}")
disp("System libraries: " "${DEFAULT_LIBRARY}")

message(STATUS "")

# Display libraries

if(ISVD_USE_PACKAGE AND ISVD_OMP)
disp("Use OpenMP: " "${OpenMP_LIBRARIES}")
disp("OpenMP: " "${OpenMP_LIBRARIES}")
else()
disp("Use OpenMP: " "OFF")
disp("OpenMP: " "OFF")
endif()

if(ISVD_USE_PACKAGE)
disp("Use MPI: " "${MPI_C_LIBRARIES}")
disp("MPI: " "${MPI_C_LIBRARIES}")
else()
disp("Use MPI: " "OFF")
disp("MPI: " "OFF")
endif()

if(ISVD_USE_PACKAGE)
if(NOT ISVD_USE_MKL)
set(LAPACK_LIBS ${LAPACK_LIBRARIES})
list(REMOVE_DUPLICATES LAPACK_LIBS)
disp("Use BLAS: " "${LAPACK_LIBS}")
disp("BLAS: " "${LAPACK_LIBS}")
else()
disp("Use BLAS: (Intel MKL) " "${MKL_LIBS}")
disp("BLAS: (Intel MKL) " "${MKL_LIBS}")
endif()
endif()

if(ISVD_USE_PACKAGE AND ISVD_USE_GPU)
disp("Use GPU: " "${CUDA_TOOLKIT_ROOT_DIR}")
disp("Use MAGMA: " "${MAGMA_LIBRARIES}")
disp("GPU: " "${CUDA_TOOLKIT_ROOT_DIR}")
disp("MAGMA: " "${MAGMA_LIBRARIES}")
else()
disp("Use GPU: " "OFF")
disp("GPU: " "OFF")
endif()

if(ISVD_BUILD_TEST)
disp("Use Google Test: " "${GTEST_BOTH_LIBRARIES}")
disp("Google Test: " "${GTEST_BOTH_LIBRARIES}")
else()
disp("Use Google Test: " "OFF")
disp("Google Test: " "OFF")
endif()

if(ISVD_BUILD_DOC)
disp("Use Doxygen: " "${DOXYGEN_EXECUTABLE}")
disp("Doxygen: " "${DOXYGEN_EXECUTABLE}")
else()
disp("Use Doxygen: " "OFF")
disp("Doxygen: " "OFF")
endif()

message(STATUS "")

if(ISVD_USE_PACKAGE)
disp("MPI processes (demo only): " "${MPI_PROCS}")
disp("OpenMP threads (demo only): " "${OMP_THRDS}")
if(ISVD_OMP)
disp("OpenMP threads (demo only): " "${OMP_THRDS}")
endif()
endif()

message(STATUS "")
message(STATUS "================================================================================")
message(STATUS "")

if(ISVD_USE_PACKAGE)
if(ISVD_USE_PACKAGE AND CMAKE_WARNING)
if(ISVD_BLAS STREQUAL "BLAS" AND ISVD_OMP)
message(${DEPRECATION} "${Esc}[1;33mPlain BLAS library might not support OpenMP multithreading.${Esc}[0m")
endif()
Expand Down
1 change: 1 addition & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ option(ISVD_BUILD_DOC "Build documentation." "ON")
option(ISVD_USE_GPU "Enable GPU support." "OFF")
option(ISVD_TEST_DEEP "Enable deep unit tests." "ON")
option(ISVD_TEST_VERBOSE "Enable verbose unit tests." "ON")
option(CMAKE_WARNING "Enable CMake warning." "ON")

set(ISVD_INDEX_TYPE "32" CACHE STRING "Index type. [32/64]")
set_property(CACHE ISVD_INDEX_TYPE PROPERTY STRINGS "32;64")
Expand Down

0 comments on commit 03884ab

Please sign in to comment.