diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c93ad6d61..5020a2b88c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,14 +21,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # -cmake_minimum_required( VERSION 3.0.2 FATAL_ERROR ) -# because of http://public.kitware.com/Bug/view.php?id=10395 - -# See https://gitlab.kitware.com/cmake/cmake/issues/15943 -# Remove as soon as 3.1 is minimum required version -if(POLICY CMP0025) - cmake_policy(SET CMP0025 NEW) # CMake 3.0 -endif() +cmake_minimum_required( VERSION 3.2 FATAL_ERROR ) # Default to CMAKE_BUILD_TYPE = Release unless overridden on command line # http://www.cmake.org/pipermail/cmake/2008-September/023808.html @@ -222,24 +215,6 @@ include( PerformFeatureChecks ) perform_feature_checks() -# Workaround: CMake < 3.1 does not support CMAKE_CXX_STANDARD -if( NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 3.1 ) - message( FATAL_ERROR "Remove compatibility code" ) -endif() - -if( CMAKE_VERSION VERSION_LESS 3.1 AND ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) ) - include(CheckCXXCompilerFlag) - - CHECK_CXX_COMPILER_FLAG("-std=gnu++14" COMPILER_SUPPORTS_CXX14) - - if(COMPILER_SUPPORTS_CXX14) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14") - else() - message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.") - endif() -endif() - - # Setup the compiler warnings include( ${CMAKE_MODULE_PATH}/Warnings.cmake ) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8daf045f28..683ad1ed3d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -144,6 +144,7 @@ add_custom_target( -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH} -P ${CMAKE_MODULE_PATH}/WriteVersionHeader.cmake WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + BYPRODUCTS ${CMAKE_BINARY_DIR}/kicad_build_version.h COMMENT "Generating version string header" )