summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2008-09-11 18:34:04 (GMT)
committerDavid Cole <david.cole@kitware.com>2008-09-11 18:34:04 (GMT)
commitbd1935dcd12d23a23878dc727545743fb078c7cb (patch)
treef25e552c73dc9ea3c31ff186829f5bdd905c1324 /Source/cmPolicies.cxx
parent0e5319f21dc6a6079a8af82e40ca3e9da563b6de (diff)
downloadCMake-bd1935dcd12d23a23878dc727545743fb078c7cb.zip
CMake-bd1935dcd12d23a23878dc727545743fb078c7cb.tar.gz
CMake-bd1935dcd12d23a23878dc727545743fb078c7cb.tar.bz2
ENH: Improve FILE GLOB_RECURSE handling of symlinks with a new CMake policy. CMP0009 establishes NEW default behavior of not recursing through symlinks. OLD default behavior or explicit FOLLOW_SYMLINKS argument to FILE GLOB_RECURSE will still recurse through symlinks.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 640e0e7..5d8c71f 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -307,6 +307,22 @@ cmPolicies::cmPolicies()
"The NEW behavior for this policy is to trust the given path and "
"pass it directly to the native build tool unchanged.",
2,6,1, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0009, "CMP0009",
+ "FILE GLOB_RECURSE calls should not follow symlinks by default.",
+ "In CMake 2.6.1 and below, FILE GLOB_RECURSE calls would follow "
+ "through symlinks, sometimes coming up with unexpectedly large "
+ "result sets because of symlinks to top level directories that "
+ "contain hundreds of thousands of files."
+ "\n"
+ "This policy determines whether or not to follow symlinks "
+ "encountered during a FILE GLOB_RECURSE call. "
+ "The OLD behavior for this policy is to follow the symlinks. "
+ "The NEW behavior for this policy is not to follow the symlinks "
+ "by default, but only if FOLLOW_SYMLINKS is given as an additional "
+ "argument to the FILE command.",
+ 2,6,2, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()
@@ -384,7 +400,7 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
"In order to get compatibility features supporting versions earlier "
"than 2.4 set policy CMP0001 to OLD to tell CMake to check the "
"CMAKE_BACKWARDS_COMPATIBILITY variable. "
- "One way to so this is to set the policy version to 2.4 exactly."
+ "One way to do this is to set the policy version to 2.4 exactly."
);
return false;
}