Skip to content
Snippets Groups Projects
Commit a3ea3db6 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Merge branch 'feature/increase-required-cmake-version' into 'master'

Increase required CMake version to 3.16

See merge request !1302
parents 1437ba8a a6eda3f0
No related branches found
No related tags found
1 merge request!1302Increase required CMake version to 3.16
Pipeline #65758 passed with warnings
Pipeline: Dune Nightly Test

#65767

    ......@@ -11,7 +11,7 @@ In order to build the DUNE core modules you need at least the following software
    - The construction of `FiedlMatrix` and `FieldVector` from `std::initializer_list`
    is now `constexpr`.
    - C++ compilers LLVM Clang >= 10 or GCC g++ >= 9
    - CMake >= 3.13
    - CMake >= 3.16
    - Optional: pkg-config to find other optional dependencies
    - Optional: Python >= 3.7 for Python bindings
    ......@@ -95,6 +95,10 @@ In order to build the DUNE core modules you need at least the following software
    - The cmake options `CXX_MAX_STANDARD`, `CXX_MAX_SUPPORTED_STANDARD` and `DISABLE_CXX_VERSION_CHECK`
    are removed. The cmake function `dune_require_cxx_standard()` is now deprecated.
    - Deprecate CMake macro `message_verbose`. Use `message(VERBOSE "message text")` instead.
    This macro will be removed after Dune 2.10.
    ## Deprecations and removals
    - The deprecated header `dune/common/function.hh` has been removed. Use C++ function
    ......
    # SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
    # SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    cmake_minimum_required(VERSION 3.13)
    cmake_minimum_required(VERSION 3.16)
    project(dune-common LANGUAGES C CXX)
    # make sure our own modules are found
    ......
    ......@@ -27,7 +27,7 @@ Dependencies
    dune-common depends on the following software packages
    - CMake >= 3.13
    - CMake >= 3.16
    - Compiler (C, C++): GNU >= 9 or Clang >= 10
    Other compilers might work too, they need to support C++17 to the extent the
    ......@@ -80,4 +80,4 @@ Links
    3. https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license
    [installation]: https://www.dune-project.org/doc/installation
    [license]: https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license
    \ No newline at end of file
    [license]: https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.license
    ......@@ -138,7 +138,7 @@ def main(argv):
    """)
    requires = data.asPythonRequirementString(data.depends + data.python_requires)
    requires = list(set(requires)) # make requirements unique
    minimal = ["pip", "setuptools", "wheel", "scikit-build", "cmake>=3.13", "ninja", "requests"]
    minimal = ["pip", "setuptools", "wheel", "scikit-build", "cmake>=3.16", "ninja", "requests"]
    requires += [r for r in minimal if not any([a.startswith(r) for a in requires])]
    requires.sort()
    f.write("[build-system]\n")
    ......
    ......@@ -348,7 +348,7 @@ Preparing the Sources
    Additional to the software mentioned in README you'll need the
    following programs installed on your system:
    cmake >= 3.13
    cmake >= 3.16
    Getting started
    ---------------
    ......@@ -400,7 +400,7 @@ R_DELIM
    ################## CMakeLists.txt ##################
    echo "- $PROJECT/CMakeLists.txt"
    cat> "$PROJECT/CMakeLists.txt" << M_DELIM
    cmake_minimum_required(VERSION 3.13)
    cmake_minimum_required(VERSION 3.16)
    project($PROJECT CXX)
    if(NOT (dune-common_DIR OR dune-common_ROOT OR
    ......
    ......@@ -469,13 +469,15 @@
    include_guard(GLOBAL)
    # macro to print additional information to the cmake output file.
    # Note: in cmake 3.15 this is available through the message(VERBOSE "...") function.
    #
    # .. deprecated:: 2.10
    #
    # Use `message(VERBOSE "message text")` instead. This macro will be
    # removed after Dune 2.10.
    macro(message_verbose TEXT)
    if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
    message(VERBOSE "${TEXT}")
    else()
    file(APPEND ${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log "${TEXT}\n")
    endif()
    message(VERBOSE "${TEXT}")
    message(DEPRECATION "message_verbose is deprecated, use directly message(VERBOSE \"message text\")")
    endmacro(message_verbose)
    ......@@ -620,7 +622,7 @@ endfunction(dune_instance_set_generated)
    # protect against problems with empty elements and against cmakes list()
    # command butchering it's own quoting.
    function(dune_instance_parse_embedded name content_parts template_parts template_names)
    message_verbose("Parsing ${name} for embedded templates")
    message(VERBOSE "Parsing ${name} for embedded templates")
    file(READ "${name}" content)
    # ensure that the file content ends in a newline, which makes searching for
    # template marker easier
    ......@@ -720,7 +722,7 @@ function(dune_instance_generate_file TEMPLATE INSTANCE)
    dune_instance_set_generated()
    # do the generation
    message_verbose("Generating ${TEMPLATE} -> ${INSTANCE}")
    message(VERBOSE "Generating ${TEMPLATE} -> ${INSTANCE}")
    file(READ "${TEMPLATE}" _content)
    string(CONFIGURE "${_content}" _content)
    ......@@ -924,7 +926,7 @@ function(dune_instance_end)
    # remove the final newline that we appended when reading the template file
    string(REGEX REPLACE "\n\$" "" _content "${_content}")
    message_verbose("Writing ${INSTANCE}")
    message(VERBOSE "Writing ${INSTANCE}")
    # only write if the content changes, avoiding recompilations
    dune_write_changed_file("${BINDIR_INSTANCE}" "${_content}")
    ......
    ......@@ -54,12 +54,6 @@
    #
    include_guard(GLOBAL)
    # switches ``Python3_FIND_STRATEGY`` from VERSION to LOCATION
    # which was introduced in CMake 3.15 and will become the new default
    if(POLICY CMP0094)
    cmake_policy(SET CMP0094 NEW)
    endif()
    # unless the user has defined the variable, unversioned names (like python3) are found
    # first, to match what users most probably use later on to call the executable
    if(NOT DEFINED Python3_FIND_UNVERSIONED_NAMES)
    ......
    ......@@ -21,7 +21,7 @@ CMake...
    You can install CMake through your favorite package manager or downloading source code from
    `KITWare <http://www.cmake.org>`_
    The minimum required version to build Dune with CMake is 3.13.
    The minimum required version to build Dune with CMake is 3.16.
    .. _howtouse:
    ......
    ......@@ -13,5 +13,5 @@
    # included in the package install from source.
    #
    [build-system]
    requires = ['cmake>=3.13', 'jinja2', 'ninja', 'numpy', 'pip>=21.a', 'portalocker', 'requests', 'scikit-build', 'setuptools>=41', 'wheel']
    requires = ['cmake>=3.16', 'jinja2', 'ninja', 'numpy', 'pip>=21.a', 'portalocker', 'requests', 'scikit-build', 'setuptools>=41', 'wheel']
    build-backend = 'setuptools.build_meta'
    ......@@ -10,6 +10,3 @@ dune_python_configure_bindings(
    PATH "."
    CMAKE_METADATA_FLAGS DUNE_OPTS_FILE HAVE_MPI CMAKE_BUILD_TYPE CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_C_COMPILER CMAKE_C_FLAGS CMAKE_PREFIX_PATH CMAKE_CXX_COMPILER_LAUNCHER
    )
    if(POLICY CMP0087)
    cmake_policy(SET CMP0087 NEW)
    endif()
    ......@@ -68,7 +68,7 @@ def make_project(dir, description, subdirs=None, enable_all_packages=True, is_du
    with open(os.path.join(dir, 'dune.module'), 'w') as file:
    file.write(repr(description))
    cmake_content = ['cmake_minimum_required(VERSION 3.13)', 'project(' + description.name + ' C CXX)']
    cmake_content = ['cmake_minimum_required(VERSION 3.16)', 'project(' + description.name + ' C CXX)']
    if is_dunepy:
    cmake_content += ['', 'set(DUNE_ENABLE_PYTHONBINDINGS ON)']
    cmake_content += ['',
    ......
    # SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
    # SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
    cmake_minimum_required(VERSION 3.13)
    cmake_minimum_required(VERSION 3.16)
    # acquire lock to avoid cmake raise conditions
    ......
    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