add an option to turn on mcpl-support

This commit is contained in:
Erik B Knudsen 2022-07-13 10:26:24 +02:00
parent 8c9bb761e5
commit 915d69fb3d

View file

@ -36,6 +36,7 @@ option(OPENMC_ENABLE_COVERAGE "Compile with coverage analysis flags"
option(OPENMC_USE_DAGMC "Enable support for DAGMC (CAD) geometry" OFF)
option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tallies" OFF)
option(OPENMC_USE_MPI "Enable MPI" OFF)
option(OPENMC_USE_MCPL "Enable MPCPL" OFF)
#===============================================================================
# Set a default build configuration if not explicitly specified
@ -154,6 +155,10 @@ 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}")
@ -408,6 +413,10 @@ 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)