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 1509420c21
commit 2cbcd53f07

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)
# Warnings for deprecated options
foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh")
@ -185,6 +186,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}")
@ -439,6 +444,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)