mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Cleanup of CMake files.
This commit is contained in:
parent
19560dbc7b
commit
21d3c14d86
2 changed files with 8 additions and 17 deletions
|
|
@ -66,12 +66,12 @@ if(pugixml_FOUND)
|
|||
message(STATUS "Found pugixml: ${pugixml_DIR}")
|
||||
else()
|
||||
message(STATUS "Did not find pugixml, will use submodule instead")
|
||||
|
||||
#===============================================================================
|
||||
# libMesh Unstructured Mesh Support
|
||||
#===============================================================================
|
||||
if(libmesh)
|
||||
find_package(LIBMESH REQUIRED)
|
||||
list(APPEND cxxflags ${LIBMESH_CFLAGS})
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
|
|
@ -389,9 +389,6 @@ endif()
|
|||
if (MPI_ENABLED)
|
||||
target_compile_definitions(libopenmc PUBLIC -DOPENMC_MPI)
|
||||
endif()
|
||||
if (libmesh)
|
||||
target_compile_definitions(libopenmc PRIVATE LIBMESH)
|
||||
endif()
|
||||
|
||||
# Set git SHA1 hash as a compile definition
|
||||
if(GIT_FOUND)
|
||||
|
|
@ -416,11 +413,8 @@ if(dagmc)
|
|||
endif()
|
||||
|
||||
if(libmesh)
|
||||
if (debug)
|
||||
target_link_libraries(libopenmc PkgConfig::LIBMESH_DEVEL)
|
||||
else()
|
||||
target_link_libraries(libopenmc PkgConfig::LIBMESH)
|
||||
endif()
|
||||
target_compile_definitions(libopenmc PRIVATE LIBMESH)
|
||||
target_link_libraries(libopenmc PkgConfig::LIBMESH)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
# Finds the libMesh installation using CMake's PkgConfig
|
||||
# module and creates a libmesh imported target
|
||||
|
||||
find_path(LIBMESH_PC NAMES libmesh-opt.pc
|
||||
HINTS ${LIBMESH_DIR} $ENV{LIBMESH_ROOT}
|
||||
PATHS ENV LD_LIBRARY_PATH
|
||||
PATH_SUFFIXES lib/pkgconfig pkgconfig
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
include(FindPkgConfig)
|
||||
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")
|
||||
pkg_check_modules(LIBMESH REQUIRED libmesh IMPORTED_TARGET)
|
||||
pkg_check_modules(LIBMESH_DEVEL REQUIRED libmesh-devel IMPORTED_TARGET)
|
||||
|
||||
message(STATUS "Found LIBMESH in ${LIBMESH_PC}")
|
||||
find_path(LIBMESH_PC NAMES libmesh.pc
|
||||
HINTS ${LIBMESH_LIBDIR}
|
||||
PATHS ENV LD_LIBRARY_PATH
|
||||
PATH_SUFFIXES lib/pkgconfig pkgconfig
|
||||
NO_DEFAULT_PATH)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue