Commit 7b0efcde authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'fix-policy-scopes'

50fd0a33 Tests: Simplify and document policy scopes in RunCMake.CMP* tests
b1bbee3e Record more policies on targets when created
parents 6f154843 50fd0a33
......@@ -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;
......
......@@ -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:
{
......
......@@ -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;
......
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} NONE)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
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
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
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
......
cmake_minimum_required(VERSION 2.8.4)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
cmake_minimum_required(VERSION 2.8.12)
project(${RunCMake_TEST} CXX)
include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE)
include(${RunCMake_TEST}.cmake)
......@@ -11,8 +11,11 @@
\* CMP0020
\* CMP0021
\* CMP0022
\* CMP0027
\* CMP0038
\* CMP0041
\* CMP0042
\* CMP0046
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment