mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
Merge topic 'deprecate-pre-2.8.12'
5845c218d7Deprecate compatibility with CMake versions older than 2.8.127b07ccdd2bTests/*Only: Update cmake_minimum_required versions9b99b4bfc8Tests/RunCMake: Update cmake_minimum_required versionsfcea4a3b45cmStateSnapshot: Invert CanPopPolicyScope return value to match name Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ben Boeckel <ben.boeckel@kitware.com> Merge-request: !4897
This commit is contained in:
@@ -6,3 +6,8 @@ deprecate-policy-old
|
||||
The :manual:`cmake-policies(7)` manual explains that the OLD behaviors
|
||||
of all policies are deprecated and that projects should port to the
|
||||
NEW behaviors.
|
||||
|
||||
* Compatibility with versions of CMake older than 2.8.12 is now deprecated
|
||||
and will be removed from a future version. Calls to
|
||||
:command:`cmake_minimum_required` or :command:`cmake_policy` that set
|
||||
the policy version to an older value now issue a deprecation diagnostic.
|
||||
|
||||
@@ -1659,7 +1659,8 @@ void cmMakefile::Configure()
|
||||
this->SetCheckCMP0000(true);
|
||||
|
||||
// Implicitly set the version for the user.
|
||||
this->SetPolicyVersion("2.4", std::string());
|
||||
cmPolicies::ApplyPolicyVersion(this, 2, 4, 0,
|
||||
cmPolicies::WarnCompat::Off);
|
||||
}
|
||||
}
|
||||
bool hasProject = false;
|
||||
@@ -4605,7 +4606,7 @@ void cmMakefile::PopSnapshot(bool reportError)
|
||||
// cmStateSnapshot manages nested policy scopes within it.
|
||||
// Since the scope corresponding to the snapshot is closing,
|
||||
// reject any still-open nested policy scopes with an error.
|
||||
while (!this->StateSnapshot.CanPopPolicyScope()) {
|
||||
while (this->StateSnapshot.CanPopPolicyScope()) {
|
||||
if (reportError) {
|
||||
this->IssueMessage(MessageType::FATAL_ERROR,
|
||||
"cmake_policy PUSH without matching POP");
|
||||
@@ -4621,7 +4622,8 @@ void cmMakefile::PopSnapshot(bool reportError)
|
||||
bool cmMakefile::SetPolicyVersion(std::string const& version_min,
|
||||
std::string const& version_max)
|
||||
{
|
||||
return cmPolicies::ApplyPolicyVersion(this, version_min, version_max);
|
||||
return cmPolicies::ApplyPolicyVersion(this, version_min, version_max,
|
||||
cmPolicies::WarnCompat::On);
|
||||
}
|
||||
|
||||
bool cmMakefile::HasCMP0054AlreadyBeenReported(
|
||||
|
||||
@@ -7,9 +7,11 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include "cmListFileCache.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmMessageType.h"
|
||||
#include "cmState.h"
|
||||
#include "cmStateSnapshot.h"
|
||||
#include "cmStateTypes.h"
|
||||
#include "cmStringAlgorithms.h"
|
||||
#include "cmSystemTools.h"
|
||||
@@ -157,7 +159,8 @@ static bool GetPolicyDefault(cmMakefile* mf, std::string const& policy,
|
||||
|
||||
bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf,
|
||||
std::string const& version_min,
|
||||
std::string const& version_max)
|
||||
std::string const& version_max,
|
||||
WarnCompat warnCompat)
|
||||
{
|
||||
// Parse components of the minimum version.
|
||||
unsigned int minMajor = 2;
|
||||
@@ -244,13 +247,34 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf,
|
||||
polPatch = maxPatch;
|
||||
}
|
||||
|
||||
return cmPolicies::ApplyPolicyVersion(mf, polMajor, polMinor, polPatch);
|
||||
return cmPolicies::ApplyPolicyVersion(mf, polMajor, polMinor, polPatch,
|
||||
warnCompat);
|
||||
}
|
||||
|
||||
bool cmPolicies::ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
|
||||
unsigned int minorVer,
|
||||
unsigned int patchVer)
|
||||
unsigned int patchVer,
|
||||
WarnCompat warnCompat)
|
||||
{
|
||||
// Warn about policy versions for which support will be removed.
|
||||
if (warnCompat == WarnCompat::On &&
|
||||
(majorVer < 2 || (majorVer == 2 && minorVer < 8) ||
|
||||
(majorVer == 2 && minorVer == 8 && patchVer < 12)) &&
|
||||
// Avoid warning on calls generated by install(EXPORT)
|
||||
// in CMake versions prior to 3.18.
|
||||
!(majorVer == 2 && minorVer == 6 && patchVer == 0 &&
|
||||
mf->GetStateSnapshot().CanPopPolicyScope() &&
|
||||
cmSystemTools::Strucmp(mf->GetBacktrace().Top().Name.c_str(),
|
||||
"cmake_policy") == 0)) {
|
||||
mf->IssueMessage(
|
||||
MessageType::DEPRECATION_WARNING,
|
||||
"Compatibility with CMake < 2.8.12 will be removed from "
|
||||
"a future version of CMake.\n"
|
||||
"Update the VERSION argument <min> value or use a ...<max> suffix "
|
||||
"to tell CMake that the project does not need compatibility with "
|
||||
"older versions.");
|
||||
}
|
||||
|
||||
// now loop over all the policies and set them as appropriate
|
||||
std::vector<cmPolicies::PolicyID> ancientPolicies;
|
||||
for (PolicyID pid = cmPolicies::CMP0000; pid != cmPolicies::CMPCOUNT;
|
||||
|
||||
@@ -399,12 +399,20 @@ public:
|
||||
//! Get the default status for a policy
|
||||
static cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id);
|
||||
|
||||
enum class WarnCompat
|
||||
{
|
||||
Off,
|
||||
On
|
||||
};
|
||||
|
||||
//! Set a policy level for this listfile
|
||||
static bool ApplyPolicyVersion(cmMakefile* mf,
|
||||
std::string const& version_min,
|
||||
std::string const& version_max);
|
||||
std::string const& version_max,
|
||||
WarnCompat warnCompat);
|
||||
static bool ApplyPolicyVersion(cmMakefile* mf, unsigned int majorVer,
|
||||
unsigned int minorVer, unsigned int patchVer);
|
||||
unsigned int minorVer, unsigned int patchVer,
|
||||
WarnCompat warnCompat);
|
||||
|
||||
//! return a warning string for a given policy
|
||||
static std::string GetPolicyWarning(cmPolicies::PolicyID id);
|
||||
|
||||
@@ -148,7 +148,7 @@ bool cmStateSnapshot::PopPolicy()
|
||||
|
||||
bool cmStateSnapshot::CanPopPolicyScope()
|
||||
{
|
||||
return this->Position->Policies == this->Position->PolicyScope;
|
||||
return this->Position->Policies != this->Position->PolicyScope;
|
||||
}
|
||||
|
||||
void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# a simple C only test case
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project (COnly C)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
# a simple CSharp only test case
|
||||
project (CSharpOnly CSharp)
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# a simple CXX only test case
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project (CxxOnly CXX)
|
||||
|
||||
set(CMAKE_DEBUG_POSTFIX "_test_debug_postfix")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(FortranOnly Fortran)
|
||||
message("CTEST_FULL_OUTPUT ")
|
||||
|
||||
|
||||
6
Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
Normal file
6
Tests/RunCMake/CMP0019/CMP0019-NEW-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
@@ -1,4 +1,11 @@
|
||||
^CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
+
|
||||
CMake Deprecation Warning at CMP0019-OLD.cmake:[0-9]+ \(cmake_policy\):
|
||||
The OLD behavior for policy CMP0019 will be removed from a future version
|
||||
of CMake.
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
+
|
||||
CMake Warning \(dev\) in CMakeLists.txt:
|
||||
Policy CMP0019 is not set: Do not re-expand variables in include and link
|
||||
information. Run "cmake --help-policy CMP0019" for policy details. Use
|
||||
|
||||
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
Normal file
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-exe-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
Normal file
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-shared-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
Normal file
6
Tests/RunCMake/CMP0022/CMP0022-NOWARN-static-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
@@ -1,3 +1,10 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
+
|
||||
CMake Warning \(dev\) in CMakeLists.txt:
|
||||
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
|
||||
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
^CMake Warning \(dev\) in CMakeLists.txt:
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
+
|
||||
CMake Warning \(dev\) in CMakeLists.txt:
|
||||
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
|
||||
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
|
||||
cmake_policy command to set the policy and suppress this warning.
|
||||
|
||||
6
Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
Normal file
6
Tests/RunCMake/CMP0022/CMP0022-export-exe-stderr.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
^CMake Deprecation Warning at CMakeLists.txt:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.$
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
if(NOT NoProject)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
endif()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(CompatibleInterface)
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ add_library(bar UNKNOWN IMPORTED)
|
||||
set_property(TARGET foo APPEND PROPERTY COMPATIBLE_INTERFACE_STRING INCLUDE_DIRECTORIES)
|
||||
|
||||
add_executable(user main.cpp)
|
||||
set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES bar_inc)
|
||||
set_property(TARGET user PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/bar_inc)
|
||||
target_link_libraries(user foo bar)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
if(NOT RunCMake_TEST)
|
||||
set(RunCMake_TEST "$ENV{RunCMake_TEST}") # needed when cache is deleted
|
||||
endif()
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
if(NOT TEST_FILE)
|
||||
set(TEST_FILE ${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_policy(SET CMP0042 NEW)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST})
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
|
||||
# MSVC creates extra targets which pollute the stderr unless we set this.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} C)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST})
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST})
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
|
||||
# MSVC creates extra targets which pollute the stderr unless we set this.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} CXX)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.5)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
project(XcodeInstallIOS)
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(foo empty.cpp)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
if(NOT NoProject)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
endif()
|
||||
|
||||
26
Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
Normal file
26
Tests/RunCMake/cmake_minimum_required/Before2812-stderr.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
^CMake Deprecation Warning at Before2812.cmake:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Deprecation Warning at Before2812.cmake:2 \(cmake_policy\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Deprecation Warning at Before2812.cmake:6 \(cmake_policy\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)$
|
||||
6
Tests/RunCMake/cmake_minimum_required/Before2812.cmake
Normal file
6
Tests/RunCMake/cmake_minimum_required/Before2812.cmake
Normal file
@@ -0,0 +1,6 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_policy(VERSION 2.6)
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(VERSION 2.6) # simulate pre-3.18 install(EXPORT)-generated call
|
||||
cmake_policy(POP)
|
||||
cmake_policy(VERSION 2.8.11)
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
^CMake Deprecation Warning at CompatBefore24.cmake:1 \(cmake_minimum_required\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Error in CMakeLists.txt:
|
||||
You have set CMAKE_BACKWARDS_COMPATIBILITY to a CMake version less than
|
||||
2.4. This version of CMake only supports backwards compatibility with
|
||||
|
||||
@@ -4,6 +4,7 @@ run_cmake(Before24)
|
||||
run_cmake(CompatBefore24)
|
||||
run_cmake(Future)
|
||||
run_cmake(PolicyBefore24)
|
||||
run_cmake(Before2812)
|
||||
run_cmake(Range)
|
||||
run_cmake(RangeBad)
|
||||
run_cmake(Unknown)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(CTestTestMemcheck@CASE_NAME@ NONE)
|
||||
include(CTest)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
|
||||
# Settings:
|
||||
set(CTEST_SITE "@SITE@")
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
CMake Warning \(dev\) at MissingNormalWarnNoModuleOld.cmake:2 \(find_package\):
|
||||
find_package called without NO_MODULE option and no FindNotHere.cmake
|
||||
module is in CMAKE_MODULE_PATH. Add NO_MODULE to exclusively request
|
||||
Config mode and search for a package configuration file provided by NotHere
|
||||
\(NotHereConfig.cmake or nothere-config.cmake\). Otherwise make
|
||||
FindNotHere.cmake available in CMAKE_MODULE_PATH.
|
||||
find_package called without either MODULE or CONFIG option and no
|
||||
FindNotHere.cmake module is in CMAKE_MODULE_PATH. Add MODULE to
|
||||
exclusively request Module mode and fail if FindNotHere.cmake is missing.
|
||||
Add CONFIG to exclusively request Config mode and search for a package
|
||||
configuration file provided by NotHere \(NotHereConfig.cmake or
|
||||
nothere-config.cmake\).
|
||||
|
||||
\(Variable CMAKE_FIND_PACKAGE_WARN_NO_MODULE enabled this warning.\)
|
||||
Call Stack \(most recent call first\):
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
add_library(if$ace INTERFACE)
|
||||
|
||||
add_library(iface::target INTERFACE)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
^CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
|
||||
^CMake Deprecation Warning at GET-CMP0007-WARN.cmake:1 \(cmake_policy\):
|
||||
Compatibility with CMake < 2.8.12 will be removed from a future version of
|
||||
CMake.
|
||||
|
||||
Update the VERSION argument <min> value or use a ...<max> suffix to tell
|
||||
CMake that the project does not need compatibility with older versions.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
+
|
||||
CMake Warning \(dev\) at GET-CMP0007-WARN.cmake:4 \(list\):
|
||||
Policy CMP0007 is not set: list command no longer ignores empty elements.
|
||||
Run "cmake --help-policy CMP0007" for policy details. Use the cmake_policy
|
||||
command to set the policy and suppress this warning. List has value =
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
project(CMP0022-WARN)
|
||||
|
||||
add_library(foo SHARED empty_vs6_1.cpp)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
project(CMP0022-WARN)
|
||||
|
||||
add_library(foo SHARED empty_vs6_1.cpp)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
cmake_policy(SET CMP0022 NEW)
|
||||
enable_language(C)
|
||||
add_library(foo STATIC empty.c)
|
||||
add_library(not_exported STATIC empty.c)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
cmake_policy(SET CMP0022 NEW)
|
||||
enable_language(C)
|
||||
add_library(foo STATIC empty.c)
|
||||
target_link_libraries(foo PRIVATE not_a_target)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
enable_language(C)
|
||||
set(obj "${CMAKE_C_OUTPUT_EXTENSION}")
|
||||
if(BORLAND)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cmake_minimum_required(VERSION 2.8.10)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(TestProject NONE)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.0)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} C)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
cmake_minimum_required(VERSION 2.8.4)
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(${RunCMake_TEST} NONE)
|
||||
include(${RunCMake_TEST}.cmake)
|
||||
|
||||
Reference in New Issue
Block a user