From: Matthias Maier Date: Tue, 29 Nov 2022 03:20:23 +0000 (-0600) Subject: CMake: require CMake version 3.11 X-Git-Tag: v9.5.0-rc1~606^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067340c15e7934285999fec8ca070f4e6835e22f;p=dealii.git CMake: require CMake version 3.11 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b4ff66d740..f4304e061a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,29 +33,19 @@ message(STATUS "This is CMake ${CMAKE_VERSION}") message(STATUS "") -cmake_minimum_required(VERSION 3.3.0) - -set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) - +cmake_minimum_required(VERSION 3.11.0) # -# We support all policy changes up to version 3.3. Thus, explicitly set all -# policies CMP0001 - CMP0054 to new for version 3.3 (and later) to avoid -# some unnecessary warnings. +# We support all policy changes up to version 3.11. # -cmake_policy(VERSION 3.3.0) - -if("${CMAKE_VERSION}" VERSION_LESS "3.11" AND POLICY CMP0037) - # Allow to override "test" target for quick tests. - cmake_policy(SET CMP0037 OLD) -endif() +cmake_policy(VERSION 3.11.0) if(POLICY CMP0075) - # Use CMAKE_REQUIRED_LIBRARIES also in include file checks. We set the - # policy to NEW explicitly in order to avoid spurious configure warnings. + # Introduced in CMake 3.12: Use CMAKE_REQUIRED_LIBRARIES also in include + # file checks. We set the policy to NEW explicitly in order to avoid + # spurious configure warnings. cmake_policy(SET CMP0075 NEW) endif() - list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/) # @@ -147,6 +137,8 @@ verbose_include(${CMAKE_SOURCE_DIR}/cmake/setup_write_config.cmake) message(STATUS "") message(STATUS "Configuring done. Proceed to target definitions now.") +set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) + add_subdirectory(cmake/scripts) add_subdirectory(include)