From 390b3dd904f9ce69945facd2cf34baf4009ff809 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Mon, 6 Sep 2021 15:59:39 -0400 Subject: [PATCH 1/2] typo --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5f070d0c7..ef5b3955e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -335,7 +335,7 @@ if (ENABLE_WFN91_LINALG_DISCOVERY_KIT) else(ENABLE_SCALAPACK) find_package(LAPACK REQUIRED) # Propagate LAPACK -> BLAS if not set - # (LAPACK necessacarily contains a BLAS linker by standard) + # (LAPACK necessarily contains a BLAS linker by standard) # TODO: Tell David to write a macro that hides this verbosity from user space if( NOT BLAS_LIBRARIES ) set( BLAS_LIBRARIES "${LAPACK_LIBRARIES}" CACHE STRING "BLAS LIBRARIES" ) From 5492a191c9ee670ff270884d3936681af9383a0a Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Mon, 6 Sep 2021 16:00:53 -0400 Subject: [PATCH 2/2] avoid use of std::filesystem by Umpire with gcc pre-9 --- cmake/modules/FindOrFetchUmpire.cmake | 7 +++++++ external/umpire.cmake | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/cmake/modules/FindOrFetchUmpire.cmake b/cmake/modules/FindOrFetchUmpire.cmake index ac5896103d..6e77dcbb48 100644 --- a/cmake/modules/FindOrFetchUmpire.cmake +++ b/cmake/modules/FindOrFetchUmpire.cmake @@ -10,6 +10,13 @@ endif (NOT TARGET umpire) # if not found, build via FetchContent if (NOT TARGET umpire) + # caveat: on recent Ubuntu default libstdc++ provides filesystem, but if using older gcc (gcc-8) must link against + # libstdc++fs: https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1824721 ... skip the use of std::filesystem altogether with pre-9 gcc!!! + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) + # disable by populating cache with compile test result variable + set(UMPIRE_ENABLE_FILESYSTEM OFF CACHE BOOL "Whether Umpire to use std::filesystem") + endif() + include(FetchContent) FetchContent_Declare( umpire diff --git a/external/umpire.cmake b/external/umpire.cmake index 27c9ea21d2..3366a04f44 100644 --- a/external/umpire.cmake +++ b/external/umpire.cmake @@ -76,6 +76,15 @@ else() -DENABLE_LOGGING=OFF -DENABLE_ASSERTS=${enable_umpire_asserts} ) + + # caveat: on recent Ubuntu default libstdc++ provides filesystem, but if using older gcc (gcc-8) must link against + # libstdc++fs: https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1824721 ... skip the use of std::filesystem altogether with pre-9 gcc!!! + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) + # disable by populating cache with compile test result variable + list(APPEND UMPIRE_CMAKE_ARGS + -DUMPIRE_ENABLE_FILESYSTEM=OFF) + endif() + if (ENABLE_CUDA) list(APPEND UMPIRE_CMAKE_ARGS -DENABLE_CUDA=ON