Skip to content
Snippets Groups Projects
Commit 27845764 authored by Andreas Dedner's avatar Andreas Dedner
Browse files

add a REQUIRE parameter to dune_python_configure_bindings

parent 46b35652
No related branches found
No related tags found
1 merge request!1406add a (optonal) REQUIRE parameter to dune_python_configure_bindings
Pipeline #72310 passed
Pipeline: Dune Nightly Test

#72312

    Pipeline: Dune Nightly Test

    #72311

      ......@@ -89,6 +89,11 @@ In order to build the DUNE core modules you need at least the following software
      ## Build System
      - Add a `REQUIRED` parameter to `dune_python_configure_bindings`. If set to
      `TRUE` the functions throws an error instead of a warning if the package
      setup fails. The default behavior (or setting `REQUIRE` to `FALSE`) is to
      show the warning during configuration and to continue.
      - Remove the search of (currently broken) `pkg-config` files for dune packages.
      - Dune package dependencies are now transitively resolved at `find_package(<dune-module>)` calls instead of waiting
      ......
      ......@@ -137,6 +137,12 @@
      # an entry of the form "flagname:=value" is added. These flags are
      # then set in the CMakeLists.txt file of a generated dune-py module.
      #
      # .. cmake_param:: REQUIRED
      # :option:
      #
      # If set, the function will error out if the package could not be installed.
      # Default behavior is to only show a warning.
      #
      # This is a convenience function that performs the tasks of
      # :dune_python_configure_dependencies:, :dune_link_dune_py:, and :dune_python_configure_package:.
      # Additionally, it makes sure that a 'setup.py' is available with the following procedure:
      ......@@ -574,7 +580,7 @@ endfunction()
      function(dune_python_configure_bindings)
      # Parse Arguments
      set(SINGLE PATH PACKAGENAME)
      set(SINGLE PATH PACKAGENAME REQUIRED)
      set(MULTI ADDITIONAL_PIP_PARAMS CMAKE_METADATA_FLAGS)
      cmake_parse_arguments(PYCONFBIND "${OPTION}" "${SINGLE}" "${MULTI}" ${ARGN})
      if(PYCONFBIND_UNPARSED_ARGUMENTS)
      ......@@ -646,7 +652,11 @@ function(dune_python_configure_bindings)
      CMAKE_METADATA_FLAGS ${PYCONFBIND_CMAKE_METADATA_FLAGS}
      )
      else()
      message(WARNING "python binding configuration failed - no linking done")
      if(PYCONFBIND_REQUIRED)
      message(FATAL_ERROR "python binding configuration failed.")
      else()
      message(WARNING "python binding configuration failed - no python package provided")
      endif()
      endif()
      endfunction()
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment