diff --git a/include/openmc/source.h b/include/openmc/source.h index bb7e2d55f7..051167b3f6 100644 --- a/include/openmc/source.h +++ b/include/openmc/source.h @@ -32,6 +32,7 @@ constexpr double EXTSRC_REJECT_FRACTION {0.05}; //============================================================================== // Global variables //============================================================================== +extern "C" const bool MCPL_ENABLED; class Source; diff --git a/tests/regression_tests/source_mcpl_file/test.py b/tests/regression_tests/source_mcpl_file/test.py index a005fc2d83..0b8e79104e 100644 --- a/tests/regression_tests/source_mcpl_file/test.py +++ b/tests/regression_tests/source_mcpl_file/test.py @@ -1,10 +1,13 @@ #!/usr/bin/env python - +import openmc.lib +import pytest import glob import os from tests.testing_harness import * - +pytestmark = pytest.mark.skipif( + not openmc.lib._mcpl_enabled(), + reason="MCPL is not enabled.") settings1="""