From 414008af660eacbc7836fd39faf2c9b116bec237 Mon Sep 17 00:00:00 2001 From: William R Tobin <4522899+wrtobin@users.noreply.github.com> Date: Fri, 19 May 2023 10:55:00 -0700 Subject: [PATCH] CMake bugfix for {fmt} (#2460) --- src/cmake/thirdparty/SetupGeosxThirdParty.cmake | 11 +++-------- src/coreComponents/common/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/cmake/thirdparty/SetupGeosxThirdParty.cmake b/src/cmake/thirdparty/SetupGeosxThirdParty.cmake index 1a47459ea8..0a889724bc 100644 --- a/src/cmake/thirdparty/SetupGeosxThirdParty.cmake +++ b/src/cmake/thirdparty/SetupGeosxThirdParty.cmake @@ -763,12 +763,7 @@ if(DEFINED FMT_DIR) set(ENABLE_FMT ON CACHE BOOL "") - if(NOT TARGET fmt AND TARGET fmt::fmt) - set_target_properties(fmt::fmt PROPERTIES IMPORTED_GLOBAL TRUE) - add_library(fmt ALIAS fmt::fmt) - endif() - - set(thirdPartyLibs ${thirdPartyLibs} fmt) + set(thirdPartyLibs ${thirdPartyLibs} fmt::fmt ) else() message(FATAL_ERROR "GEOSX requires {fmt}, set FMT_DIR to the {fmt} installation directory.") endif() @@ -848,8 +843,8 @@ option(GEOSX_LA_INTERFACE_${upper_LAI} "${upper_LAI} LA interface is selected" O # find_and_register(NAME FesapiCpp # INCLUDE_DIRECTORIES ${FESAPI_DIR}/include -# LIBRARY_DIRECTORIES ${FESAPI_DIR}/lib -# HEADER fesapi/nsDefinitions.h +# LIBRARY_DIRECTORIES ${FESAPI_DIR}/lib +# HEADER fesapi/nsDefinitions.h # LIBRARIES FesapiCpp # DEPENDS hdf5) diff --git a/src/coreComponents/common/CMakeLists.txt b/src/coreComponents/common/CMakeLists.txt index d4d0d95029..a187926da2 100644 --- a/src/coreComponents/common/CMakeLists.txt +++ b/src/coreComponents/common/CMakeLists.txt @@ -35,7 +35,7 @@ set( common_sources initializeEnvironment.cpp ) -set( dependencyList ${parallelDeps} lvarray pugixml RAJA chai conduit::conduit fmt ) +set( dependencyList ${parallelDeps} lvarray pugixml RAJA chai conduit::conduit fmt::fmt ) if ( ENABLE_MKL ) set( dependencyList ${dependencyList} mkl )