From 1115485173e3b7c53dbd7faea89ddc4e9da92b3d Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 27 Mar 2020 13:23:01 -0500 Subject: [PATCH] Making sure libmesh flags are included if enabled. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5bbf44280..fa79883043 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -123,6 +123,11 @@ if(openmp) endif() endif() +if (libmesh) + list(APPEND cxxflags ${LIBMESH_CFLAGS}) + list(APPEND ldflags ${LIBMESH_CFLAGS}) +endif() + set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND cxxflags -O2) @@ -374,7 +379,7 @@ target_include_directories(libopenmc $ $ ${HDF5_INCLUDE_DIRS} - ${LIBMESH_INCLUDE_DIRECTORIES} + ${LIBMESH_INCLUDE_DIRS} ) # Set compile flags @@ -389,6 +394,9 @@ endif() if (MPI_ENABLED) target_compile_definitions(libopenmc PUBLIC -DOPENMC_MPI) endif() +if (libmesh) + target_compile_definitions(libopenmc PUBLIC -DLIBMESH) +endif() # Set git SHA1 hash as a compile definition if(GIT_FOUND)