summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-10-02 18:10:38 (GMT)
committerBrad King <brad.king@kitware.com>2013-10-08 00:12:46 (GMT)
commitaa53ee57bb50faa3aa64e86cb58bbe2df6688335 (patch)
tree82d4a635097a71c9248f6251e02c67e0db0194f4 /Source/cmPolicies.cxx
parentab65862417adc80dfb18170a6bd70889a24fe045 (diff)
downloadCMake-aa53ee57bb50faa3aa64e86cb58bbe2df6688335.zip
CMake-aa53ee57bb50faa3aa64e86cb58bbe2df6688335.tar.gz
CMake-aa53ee57bb50faa3aa64e86cb58bbe2df6688335.tar.bz2
Add policy CMP0025 for Apple Clang compiler id compatibility
The parent commit introduced a separate "AppleClang" compiler id for Apple's Clang distribution. Add a policy in order to support projects that expect this compiler's id to be just "Clang". When the policy is OLD or not set, map AppleClang back to Clang. Continue to use the AppleClang id internally while enabling the language, but set the CMAKE_<LANG>_COMPILER_ID after project() or enable_language() to the compatible value for use by project code.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 45670b3..c3d6a94 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -620,6 +620,23 @@ cmPolicies::cmPolicies()
"The NEW behavior for this policy is to not to allow including the "
"result of an export() command.",
2,8,13,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0025, "CMP0025",
+ "Compiler id for Apple Clang is now AppleClang.",
+ "CMake >= 2.8.13 recognize that Apple Clang is a different compiler "
+ "than upstream Clang and that they have different version numbers. "
+ "CMake now prefers to present this to projects by setting "
+ "CMAKE_<LANG>_COMPILER_ID to \"AppleClang\" instead of \"Clang\". "
+ "However, existing projects may assume the compiler id for Apple Clang "
+ "is just \"Clang\" as it was in CMake < 2.8.13. "
+ "Therefore this policy determines for Apple Clang which compiler id "
+ "to report in CMAKE_<LANG>_COMPILER_ID after <LANG> is enabled by "
+ "the project() or enable_language() command."
+ "\n"
+ "The OLD behavior for this policy is to use compiler id \"Clang\". "
+ "The NEW behavior for this policy is to use compiler id \"AppleClang\".",
+ 2,8,13,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()