Merge topic 'require-cmake-2.6.3'

c3e452e Require at least CMake 2.6.3 to build current CMake
This commit is contained in:
Brad King 2011-03-01 15:30:38 -05:00 committed by CMake Topic Stage
commit 9a7c6a3cc4
4 changed files with 11 additions and 46 deletions

View File

@ -1,6 +1,6 @@
#============================================================================= #=============================================================================
# CMake - Cross Platform Makefile Generator # CMake - Cross Platform Makefile Generator
# Copyright 2000-2009 Kitware, Inc., Insight Software Consortium # Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
# #
# Distributed under the OSI-approved BSD License (the "License"); # Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details. # see accompanying file Copyright.txt for details.
@ -9,12 +9,9 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#============================================================================= #=============================================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.5 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required SET(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
PROJECT(CMake) PROJECT(CMake)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
IF(CMAKE_BOOTSTRAP) IF(CMAKE_BOOTSTRAP)
# Running from bootstrap script. Set local variable and remove from cache. # Running from bootstrap script. Set local variable and remove from cache.
@ -24,18 +21,8 @@ ENDIF()
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
# Allow empty endif() and such with CMake 2.4.
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
SET(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin) SET(CMake_BIN_DIR ${CMake_BINARY_DIR}/bin)
IF(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4)
# Since the built CMake will install itself instead of the
# generating CMake, tell it that the install rules were generated
# by CMake 2.4.
INSTALL(CODE "SET(CMAKE_INSTALL_SELF_2_4 1)")
ENDIF()
IF("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") IF("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
# Disallow architecture-specific try_run. It may not run on the host. # Disallow architecture-specific try_run. It may not run on the host.
MACRO(TRY_RUN) MACRO(TRY_RUN)

View File

@ -1711,7 +1711,7 @@ protected:
{ {
DoingType = DoingLast1, DoingType = DoingLast1,
DoingRename, DoingRename,
DoingSelf24 DoingLast2
}; };
virtual bool CheckKeyword(std::string const& arg); virtual bool CheckKeyword(std::string const& arg);
virtual bool CheckValue(std::string const& arg); virtual bool CheckValue(std::string const& arg);
@ -1850,15 +1850,6 @@ bool cmFileInstaller::CheckKeyword(std::string const& arg)
else if(arg == "COMPONENTS" || arg == "CONFIGURATIONS" || else if(arg == "COMPONENTS" || arg == "CONFIGURATIONS" ||
arg == "PROPERTIES") arg == "PROPERTIES")
{ {
if(this->Makefile->IsOn("CMAKE_INSTALL_SELF_2_4"))
{
// When CMake 2.4 builds this CMake version we need to support
// the install scripts it generates since it asks this CMake
// to install itself using the rules it generated.
this->Doing = DoingSelf24;
}
else
{
cmOStringStream e; cmOStringStream e;
e << "INSTALL called with old-style " << arg << " argument. " e << "INSTALL called with old-style " << arg << " argument. "
<< "This script was generated with an older version of CMake. " << "This script was generated with an older version of CMake. "
@ -1866,7 +1857,6 @@ bool cmFileInstaller::CheckKeyword(std::string const& arg)
this->FileCommand->SetError(e.str().c_str()); this->FileCommand->SetError(e.str().c_str());
this->Doing = DoingError; this->Doing = DoingError;
} }
}
else else
{ {
return this->cmFileCopier::CheckKeyword(arg); return this->cmFileCopier::CheckKeyword(arg);
@ -1888,12 +1878,6 @@ bool cmFileInstaller::CheckValue(std::string const& arg)
case DoingRename: case DoingRename:
this->Rename = arg; this->Rename = arg;
break; break;
case DoingSelf24:
// Ignore these arguments for compatibility. This should be
// reached only when CMake 2.4 is installing the current
// CMake. It can be removed when CMake 2.6 or higher is
// required to build CMake.
break;
default: default:
return this->cmFileCopier::CheckValue(arg); return this->cmFileCopier::CheckValue(arg);
} }

View File

@ -1,10 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
IF(CMAKE_OSX_ARCHITECTURES)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
ENDIF(CMAKE_OSX_ARCHITECTURES)
PROJECT(LIBCURL C) PROJECT(LIBCURL C)
# Setup package meta-data # Setup package meta-data

View File

@ -1,8 +1,8 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR)
# #
# #
PROJECT(libarchive C) PROJECT(libarchive C)
# #
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.1)
SET(CMAKE_MODULE_PATH "${libarchive_SOURCE_DIR}/build/cmake") SET(CMAKE_MODULE_PATH "${libarchive_SOURCE_DIR}/build/cmake")
# We use CHECK_TYPE_SIZE for existence tests, so use only one arch. # We use CHECK_TYPE_SIZE for existence tests, so use only one arch.