ソースを参照

Merge topic 'preserve_cmake_minimum_required_version'

1890c668 Keep cmake_minimum_required calls in sync with current version
81a3f228 Do not change minimum required version in modules
Brad King 11 年 前
コミット
d01320d4b7

+ 1 - 1
Modules/CheckLanguage.cmake

@@ -47,7 +47,7 @@ macro(check_language lang)
     message(STATUS ${_desc})
     file(REMOVE_RECURSE ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang})
     file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Check${lang}/CMakeLists.txt"
-      "cmake_minimum_required(VERSION 2.8)
+      "cmake_minimum_required(VERSION ${CMAKE_VERSION})
 project(Check${lang} ${lang})
 file(WRITE \"\${CMAKE_CURRENT_BINARY_DIR}/result.cmake\"
   \"set(CMAKE_${lang}_COMPILER \\\"\${CMAKE_${lang}_COMPILER}\\\")\\n\"

+ 1 - 1
Modules/CheckTypeSize.cmake

@@ -79,7 +79,7 @@ include(CheckIncludeFile)
 include(CheckIncludeFileCXX)
 
 cmake_policy(PUSH)
-cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
+cmake_policy(VERSION 3.0)
 
 get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 

+ 0 - 5
Modules/FindCUDA.cmake

@@ -330,11 +330,6 @@
 
 # FindCUDA.cmake
 
-# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
-cmake_policy(PUSH)
-cmake_minimum_required(VERSION 2.6.3)
-cmake_policy(POP)
-
 # This macro helps us find the location of helper files we will need the full path to
 macro(CUDA_FIND_HELPER_FILE _name _extension)
   set(_full_name "${_name}.${_extension}")

+ 0 - 1
Modules/FindGTK2.cmake

@@ -572,7 +572,6 @@ endif()
 # If specified, enforce version number
 #
 if(GTK2_FIND_VERSION)
-    cmake_minimum_required(VERSION 2.6.2)
     set(GTK2_FAILED_VERSION_CHECK true)
     if(GTK2_DEBUG)
         message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "

+ 1 - 1
Modules/FindSDL_sound.cmake

@@ -183,7 +183,7 @@ if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY)
    # in the SDL_LIBRARY string after the "-framework".
    # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work.
    file(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt
-     "cmake_minimum_required(VERSION 2.8)
+     "cmake_minimum_required(VERSION ${CMAKE_VERSION})
         project(DetermineSoundLibs)
         include_directories(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR})
         add_executable(DetermineSoundLibs DetermineSoundLibs.c)

+ 1 - 1
Modules/FortranCInterface/CMakeLists.txt

@@ -9,7 +9,7 @@
 # See the License for more information.
 #=============================================================================
 
-cmake_minimum_required(VERSION 2.6.3)
+cmake_minimum_required(VERSION ${CMAKE_VERSION})
 project(FortranCInterface C Fortran)
 include(${FortranCInterface_BINARY_DIR}/Input.cmake OPTIONAL)
 

+ 1 - 1
Modules/FortranCInterface/Verify/CMakeLists.txt

@@ -9,7 +9,7 @@
 # See the License for more information.
 #=============================================================================
 
-cmake_minimum_required(VERSION 2.7)
+cmake_minimum_required(VERSION ${CMAKE_VERSION})
 project(VerifyFortranC C Fortran)
 
 option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF)

+ 1 - 1
Modules/IntelVSImplicitPath/CMakeLists.txt

@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 2.8)
+cmake_minimum_required(VERSION ${CMAKE_VERSION})
 project(IntelFortranImplicit Fortran)
 add_custom_command(
   OUTPUT output.cmake