mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 13:15:39 -04:00
use find_package instead - MCPL now supports this
This commit is contained in:
parent
2ba7f8d188
commit
91cd304f0e
1 changed files with 12 additions and 8 deletions
|
|
@ -128,6 +128,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
|
||||
#===============================================================================
|
||||
|
|
@ -155,10 +162,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}")
|
||||
|
|
@ -413,10 +416,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)
|
||||
|
|
@ -460,6 +459,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