Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jakub.both/dune-common
  • samuel.burbulla/dune-common
  • patrick.jaap/dune-common
  • tobias.leibner/dune-common
  • alexander.mueller/dune-common
  • pipping/dune-common
  • Xinyun.Li/dune-common
  • felix.schindler/dune-common
  • simon.praetorius/dune-common
  • ani.anciaux-sedrakian/dune-common
  • henrik.stolzmann/dune-common
  • matthew.t.collins/dune-common
  • liam.keegan/dune-common
  • felix.mueller/dune-common
  • ansgar/dune-common
  • dominic/dune-common
  • lars.lubkoll/dune-common
  • exadune/dune-common
  • felix.gruber/dune-common
  • govind.sahai/dune-common
  • michael.sghaier/dune-common
  • core/dune-common
  • kilian.weishaupt/dune-common
  • markus.blatt/dune-common
  • joscha.podlesny/dune-common
  • tobias.meyer.andersen/dune-common
  • andreas.thune/dune-common
  • lars.bilke/dune-common
  • daniel.kienle/dune-common
  • lukas.renelt/dune-common
  • smuething/dune-common
  • stephan.hilb/dune-common
  • tkoch/dune-common
  • nils.dreier/dune-common
  • rene.milk/dune-common
  • lasse.hinrichsen/dune-common
  • yunus.sevinchan/dune-common
  • lisa_julia.nebel/dune-common
  • claus-justus.heine/dune-common
  • lorenzo.cerrone/dune-common
  • eduardo.bueno/dune-common
41 results
Show changes
Commits on Source (18)
Showing with 49 additions and 36 deletions
......@@ -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
......@@ -58,6 +58,10 @@ In order to build the DUNE core modules you need at least the following software
## Build System
- Documentation files in `doc/buildsystem/${ModuleName}.rst` are now only copied.
Previously, they were configured through the CMake function `configure_file()`
as a cmake template file.
- Try to find SuiteSparse during configuration.
- The function `dune_add_library(<lib> ...)` now requires to provide `EXPORT_NAME` or `NO_EXPORT`.
......@@ -91,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
......
......@@ -28,10 +28,16 @@ macro(dune_check_cxx_source_compiles SOURCE VAR)
message(STATUS "Performing Test ${VAR}")
file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_${VAR}.cxx" "${SOURCE}\n")
set(_cxx_std 17)
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD GREATER_EQUAL 17)
set(_cxx_std ${CMAKE_CXX_STANDARD})
endif()
try_compile(${VAR} ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src_${VAR}.cxx
CXX_STANDARD 17
CXX_STANDARD ${_cxx_std}
OUTPUT_VARIABLE OUTPUT)
unset(_cxx_std)
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${VAR} succeeded with the following output:\n"
......
......@@ -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}")
......
......@@ -212,6 +212,7 @@ set(${ProjectName}_CXX_FLAGS_RELWITHDEBINFO \"${CMAKE_CXX_FLAGS_RELWITHDEBINFO}\
set(${ProjectName}_DEPENDS \"@${ProjectName}_DEPENDS@\")
set(${ProjectName}_SUGGESTS \"@${ProjectName}_SUGGESTS@\")
set(${ProjectName}_MODULE_PATH \"@PACKAGE_DUNE_INSTALL_MODULEDIR@\")
set(${ProjectName}_PYTHON_WHEELHOUSE \"@PACKAGE_DUNE_PYTHON_WHEELHOUSE@\")
set(${ProjectName}_LIBRARIES \"@${ProjectName}_INTERFACE_LIBRARIES@\")
set(${ProjectName}_HASPYTHON @DUNE_MODULE_HASPYTHON@)
set(${ProjectName}_PYTHONREQUIRES \"@DUNE_MODULE_PYTHONREQUIRES@\")
......@@ -255,10 +256,14 @@ endif()")
set(DUNE_MODULE_PYTHONREQUIRES "")
endif()
if(NOT DEFINED DUNE_PYTHON_WHEELHOUSE)
set(DUNE_PYTHON_WHEELHOUSE "")
endif()
configure_package_config_file(${CONFIG_SOURCE_FILE}
${PROJECT_BINARY_DIR}/cmake/pkg/${ProjectName}-config.cmake
INSTALL_DESTINATION ${DUNE_INSTALL_LIBDIR}/cmake/${ProjectName}
PATH_VARS CMAKE_INSTALL_DATAROOTDIR DUNE_INSTALL_MODULEDIR CMAKE_INSTALL_INCLUDEDIR
PATH_VARS CMAKE_INSTALL_DATAROOTDIR DUNE_INSTALL_MODULEDIR CMAKE_INSTALL_INCLUDEDIR DUNE_PYTHON_WHEELHOUSE
DOXYSTYLE_DIR SCRIPT_DIR)
......@@ -268,6 +273,7 @@ endif()")
set(PACKAGE_DOXYSTYLE_DIR ${PROJECT_SOURCE_DIR}/doc/doxygen)
set(PACKAGE_SCRIPT_DIR ${PROJECT_SOURCE_DIR}/cmake/scripts)
set(PACKAGE_DUNE_INSTALL_MODULEDIR ${PROJECT_SOURCE_DIR}/cmake/modules)
set(PACKAGE_DUNE_PYTHON_WHEELHOUSE ${PROJECT_BINARY_DIR}/python)
set(PACKAGE_PREFIX_DIR ${PROJECT_BINARY_DIR})
set(PACKAGE_INIT "# Set prefix to source dir
set(PACKAGE_PREFIX_DIR ${PROJECT_SOURCE_DIR})
......
......@@ -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)
......
......@@ -325,10 +325,9 @@ else()
if(UNIX)
# create list with python module paths
set(BUILDDIR_PYTHON "$ENV{BUILDDIR}/python")
foreach( mod ${ALL_DEPENDENCIES} )
if( NOT ${${mod}_INCLUDE_DIRS} STREQUAL "")
set(MODULE_DEP_PYTHON_PATH "${MODULE_DEP_PYTHON_PATH}\n ${${mod}_INCLUDE_DIRS}/${BUILDDIR_PYTHON}")
if( NOT "_${${mod}_PYTHON_WHEELHOUSE}_" STREQUAL "__")
set(MODULE_DEP_PYTHON_PATH "${MODULE_DEP_PYTHON_PATH}\n ${${mod}_PYTHON_WHEELHOUSE}")
endif()
endforeach()
......
......@@ -131,7 +131,7 @@ function(dune_cmake_sphinx_doc)
# add it to index.rst then.
set(CMAKE_DOC_DEPENDENCIES "${CMAKE_DOC_DEPENDENCIES} ${dep}\n")
# ... and copy the rst file to the current build.
configure_file(${RSTFILE} ${CMAKE_CURRENT_BINARY_DIR}/${dep}.rst)
configure_file(${RSTFILE} ${CMAKE_CURRENT_BINARY_DIR}/${dep}.rst COPYONLY)
endif()
endforeach()
......
......@@ -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
......
......@@ -67,7 +67,8 @@ try:
minData = amin(data)
maxData = amax(data)
if clim == None:
clim = [minData, maxData]
epsData = abs(maxData - minData)*1e-8
clim = [minData-epsData, maxData+epsData]
if clim[0] > minData and clim[1] < maxData:
extend = 'both'
elif clim[0] > minData:
......