mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 12:35:29 -04:00
use find_package instead - MCPL now supports this
This commit is contained in:
parent
1519f4f3e6
commit
f76e416ee6
1 changed files with 12 additions and 8 deletions
|
|
@ -159,6 +159,13 @@ if(${HDF5_VERSION} VERSION_GREATER_EQUAL 1.12.0)
|
|||
list(APPEND cxxflags -DH5Oget_info_by_idx_vers=1 -DH5O_info_t_vers=1)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# MCPL
|
||||
#===============================================================================
|
||||
if (OPENMC_USE_MCPL)
|
||||
find_package(MCPL REQUIRED)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# Set compile/link flags based on which compiler is being used
|
||||
#===============================================================================
|
||||
|
|
@ -186,10 +193,6 @@ if(OPENMC_ENABLE_COVERAGE)
|
|||
list(APPEND ldflags --coverage)
|
||||
endif()
|
||||
|
||||
if(OPENMC_USE_MCPL)
|
||||
list(APPEND ldflags -lmcpl)
|
||||
endif()
|
||||
|
||||
# Show flags being used
|
||||
message(STATUS "OpenMC C++ flags: ${cxxflags}")
|
||||
message(STATUS "OpenMC Linker flags: ${ldflags}")
|
||||
|
|
@ -444,10 +447,6 @@ endif()
|
|||
if (OPENMC_USE_MPI)
|
||||
target_compile_definitions(libopenmc PUBLIC -DOPENMC_MPI)
|
||||
endif()
|
||||
if(OPENMC_USE_MCPL)
|
||||
target_compile_definitions(libopenmc PUBLIC -DOPENMC_MCPL)
|
||||
endif()
|
||||
|
||||
|
||||
# Set git SHA1 hash as a compile definition
|
||||
if(GIT_FOUND)
|
||||
|
|
@ -491,6 +490,11 @@ if (OPENMC_USE_MPI)
|
|||
target_link_libraries(libopenmc MPI::MPI_CXX)
|
||||
endif()
|
||||
|
||||
if (OPENMC_USE_MCPL)
|
||||
target_compile_definitions(libopenmc PUBLIC OPENMC_MCPL)
|
||||
target_link_libraries(libopenmc MCPL::mcpl)
|
||||
endif()
|
||||
|
||||
#===============================================================================
|
||||
# openmc executable
|
||||
#===============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue