diff --git a/CMakeLists.txt b/CMakeLists.txt index cdee39aef2d9fdbd2acda6b87cff5bd56436b960..d824930b0e41942c43152db38ca5a0c9281445a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,7 @@ endif() if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.16) option(OGS_USE_UNITY_BUILDS "Enables Unity builds for faster compilation." ON) endif() +option(OGS_USE_PYTHON "Interface with Python" ON) option(OGS_DISABLE_POETRY "Disables automatic Python virtual environment handling with poetry." OFF) # Third-party libraries, names come from Conan package names @@ -183,10 +184,7 @@ endif() option(OGS_CHECK_HEADER_COMPILATION "Check header for standalone compilation." OFF) -option(OGS_USE_PYTHON "Interface with Python" OFF) -if(OGS_USE_PYTHON AND NOT Python3_FOUND) - message(FATAL_ERROR "Python not found but required for OGS_USE_PYTHON=ON!") -endif() +option(OGS_USE_PYTHON "Interface with Python" ${Python3_FOUND}) option(OGS_USE_MFRONT "Enable solid material models by MFront (https://tfel.sourceforge.net)" diff --git a/scripts/ci/jobs/check-header.yml b/scripts/ci/jobs/check-header.yml index 5fcbb618ce1b85b385ea809b75fa85d578aa824c..daf3914f27b60027a1cdd0fa8ae60978bb6726c8 100644 --- a/scripts/ci/jobs/check-header.yml +++ b/scripts/ci/jobs/check-header.yml @@ -6,7 +6,7 @@ check header: dependencies: [meta, meta_container] variables: BUILD_DIR: "build-check-header" - CMAKE_ARGS: "-DOGS_CHECK_HEADER_COMPILATION=ON -DOGS_BUILD_GUI=ON -DOGS_USE_PYTHON=ON -DBUILD_SHARED_LIBS=ON" + CMAKE_ARGS: "-DOGS_CHECK_HEADER_COMPILATION=ON -DOGS_BUILD_GUI=ON -DBUILD_SHARED_LIBS=ON" image: $CONTAINER_GCC_GUI_IMAGE script: - mkdir -p $BUILD_DIR diff --git a/scripts/ci/jobs/container.yml b/scripts/ci/jobs/container.yml index 3d2465d5bcdfe271c16c1fce53003774bfb4746e..0ee94ee64f7127957cda058e691914f2512ba184 100644 --- a/scripts/ci/jobs/container.yml +++ b/scripts/ci/jobs/container.yml @@ -20,7 +20,7 @@ container: poetry run ogscm compiler.py ogs.py -B -C -R --ogs ../.. --build_args ' --progress=plain' --pm system --cvode --ccache - --cmake_args ' -DOGS_CPU_ARCHITECTURE=sandybridge -DBUILD_TESTING=OFF -DOGS_BUILD_UTILS=ON -DOGS_USE_PYTHON=ON' + --cmake_args ' -DOGS_CPU_ARCHITECTURE=sandybridge -DBUILD_TESTING=OFF' $DOCKER_TAG - > poetry run ogscm compiler.py mpi.py ogs.py -B -C -R --ogs ../..