summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-03 12:27:12 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-03 12:27:12 (GMT)
commite3086213820a97db8432bf6089155509164fe960 (patch)
tree56bdbb70fa02ea4b64036af39bec6bd44d1a664c /Source/cmPolicies.cxx
parent3fda5c6463f3d0d263b8e58503fa622a46932d8c (diff)
downloadCMake-e3086213820a97db8432bf6089155509164fe960.zip
CMake-e3086213820a97db8432bf6089155509164fe960.tar.gz
CMake-e3086213820a97db8432bf6089155509164fe960.tar.bz2
Create CMP0014 to require CMakeLists.txt files
Until now CMake accidentally accepted add_subdirectory() and subdirs() calls referring to directories that do not contain a CMakeLists.txt file. We introduce CMake Policy CMP0014 to make this case an error.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index e8c7fcf..576ccd7 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -387,6 +387,18 @@ cmPolicies::cmPolicies()
"The NEW behavior for this policy is to disallow duplicate binary "
"directories with an error.",
2,6,5, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0014, "CMP0014",
+ "Input directories must have CMakeLists.txt.",
+ "CMake versions before 2.8 silently ignored missing CMakeLists.txt "
+ "files in directories referenced by add_subdirectory() or subdirs(), "
+ "treating them as if present but empty. "
+ "In CMake 2.8.0 and above this policy determines whether or not "
+ "the case is an error. "
+ "The OLD behavior for this policy is to silently ignore the problem. "
+ "The NEW behavior for this policy is to report an error.",
+ 2,7,20090902, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()