Merge topic 'fix-policy-scopes'

50fd0a33 Tests: Simplify and document policy scopes in RunCMake.CMP* tests
b1bbee3e Record more policies on targets when created
This commit is contained in:
Brad King 2014-03-10 09:33:25 -04:00 committed by CMake Topic Stage
commit 7b0efcded3
17 changed files with 23 additions and 17 deletions

View File

@ -349,7 +349,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmMakefile *makefile = depender->GetMakefile();
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
switch(makefile->GetPolicyStatus(cmPolicies::CMP0046))
switch(depender->GetPolicyStatusCMP0046())
{
case cmPolicies::WARN:
issueMessage = true;

View File

@ -1631,7 +1631,7 @@ static void processIncludeDirectories(cmTarget const* tgt,
cmake::MessageType messageType = cmake::FATAL_ERROR;
if (fromEvaluatedImported)
{
switch(mf->GetPolicyStatus(cmPolicies::CMP0027))
switch(tgt->GetPolicyStatusCMP0027())
{
case cmPolicies::WARN:
e << (mf->GetPolicies()
@ -5840,7 +5840,7 @@ void cmTarget::ComputeLinkImplementation(const std::string& config,
bool noMessage = false;
cmake::MessageType messageType = cmake::FATAL_ERROR;
cmOStringStream e;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0038))
switch(this->GetPolicyStatusCMP0038())
{
case cmPolicies::WARN:
{

View File

@ -26,8 +26,11 @@
F(CMP0020) \
F(CMP0021) \
F(CMP0022) \
F(CMP0027) \
F(CMP0038) \
F(CMP0041) \
F(CMP0042)
F(CMP0042) \
F(CMP0046)
class cmake;
class cmMakefile;

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) # policy used at end of dir
if(CMAKE_BUILD_TYPE)
# Dummy variable use

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)

View File

@ -11,8 +11,11 @@
\* CMP0020
\* CMP0021
\* CMP0022
\* CMP0027
\* CMP0038
\* CMP0041
\* CMP0042
\* CMP0046
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)