mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add cmake option to disable the python tests
due to bugs in the openmpi on bionic, this test fails to execute properly in pbuilder environments. instead of rebuilding openmpi without dynamic loading (which is the suggested fix) and potentially break users systems, this is a non-intrusive workaround to be used for packaging. also add explicit option for python support to make it visible in cmake frontends.
This commit is contained in:
@@ -27,6 +27,8 @@ option(BUILD_EBOS "Build the research oriented ebos simulator?" ON)
|
|||||||
option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF)
|
option(BUILD_EBOS_EXTENSIONS "Build the variants for various extensions of ebos by default?" OFF)
|
||||||
option(BUILD_EBOS_DEBUG_EXTENSIONS "Build the ebos variants which are purely for debugging by default?" OFF)
|
option(BUILD_EBOS_DEBUG_EXTENSIONS "Build the ebos variants which are purely for debugging by default?" OFF)
|
||||||
option(BUILD_FLOW_POLY_GRID "Build flow blackoil with polyhedral grid" OFF)
|
option(BUILD_FLOW_POLY_GRID "Build flow blackoil with polyhedral grid" OFF)
|
||||||
|
option(OPM_ENABLE_PYTHON "Enable python bindings?" OFF)
|
||||||
|
option(OPM_ENABLE_PYTHON_TESTS "Enable tests for the python bindings?" ON)
|
||||||
|
|
||||||
if(SIBLING_SEARCH AND NOT opm-common_DIR)
|
if(SIBLING_SEARCH AND NOT opm-common_DIR)
|
||||||
# guess the sibling dir
|
# guess the sibling dir
|
||||||
|
|||||||
@@ -25,8 +25,10 @@ file( COPY ${PROJECT_SOURCE_DIR}/python/test
|
|||||||
file( COPY ${PROJECT_SOURCE_DIR}/python/test_data
|
file( COPY ${PROJECT_SOURCE_DIR}/python/test_data
|
||||||
DESTINATION ${PROJECT_BINARY_DIR}/python)
|
DESTINATION ${PROJECT_BINARY_DIR}/python)
|
||||||
|
|
||||||
add_test(NAME python_tests
|
if(OPM_ENABLE_PYTHON_TESTS)
|
||||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
add_test(NAME python_tests
|
||||||
COMMAND ${CMAKE_COMMAND}
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
||||||
-E env PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
${PYTHON_EXECUTABLE} -m unittest )
|
-E env PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH}
|
||||||
|
${PYTHON_EXECUTABLE} -m unittest )
|
||||||
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user