From 09eb33ac217dc7695049e5b7f76d45f6332a1499 Mon Sep 17 00:00:00 2001 From: Davide Mancusi Date: Tue, 23 Jan 2024 16:48:21 +0100 Subject: [PATCH] Fix compilation on CentOS 7 (missing link to libdl) (#2849) Co-authored-by: Paul Romano --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf3555d843..ec6ea61792 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -497,7 +497,7 @@ endif() # target_link_libraries treats any arguments starting with - but not -l as # linker flags. Thus, we can pass both linker flags and libraries together. target_link_libraries(libopenmc ${ldflags} ${HDF5_LIBRARIES} ${HDF5_HL_LIBRARIES} - xtensor gsl::gsl-lite-v1 fmt::fmt) + xtensor gsl::gsl-lite-v1 fmt::fmt ${CMAKE_DL_LIBS}) if(TARGET pugixml::pugixml) target_link_libraries(libopenmc pugixml::pugixml)