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" ) 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