summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.h
diff options
context:
space:
mode:
authorRobert Maynard <rmaynard@nvidia.com>2023-06-29 19:24:49 (GMT)
committerRobert Maynard <rmaynard@nvidia.com>2023-07-20 21:02:58 (GMT)
commit6b5f2dbbfe453f9bafe46ee420e657735ff16fb0 (patch)
treea27c2718ea6c2ddd76e75b35eb035cfc48a0b358 /Source/cmPolicies.h
parentb0054dd65c1d69a437abe85d27e704326884a9c2 (diff)
downloadCMake-6b5f2dbbfe453f9bafe46ee420e657735ff16fb0.zip
CMake-6b5f2dbbfe453f9bafe46ee420e657735ff16fb0.tar.gz
CMake-6b5f2dbbfe453f9bafe46ee420e657735ff16fb0.tar.bz2
file(REAL_PATH): resolve symlinks before '..' components
Previously REAL_PATH would collapse paths before resolving any symlinks so if `..` crossed a symlink the output from `REAL_PATH` would be wrong. It looked like REAL_PATH did this by mistake since it was a side-effect of ensuring we had an absolute path before resolving symlinks.
Diffstat (limited to 'Source/cmPolicies.h')
-rw-r--r--Source/cmPolicies.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index a0030d3..25af6a8 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -459,7 +459,11 @@ class cmMakefile;
SELECT(POLICY, CMP0151, \
"AUTOMOC include directory is a system include directory by " \
"default.", \
- 3, 27, 0, cmPolicies::WARN)
+ 3, 27, 0, cmPolicies::WARN) \
+ SELECT( \
+ POLICY, CMP0152, \
+ "file(REAL_PATH) resolves symlinks before collapsing ../ components.", 3, \
+ 28, 0, cmPolicies::WARN)
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
#define CM_FOR_EACH_POLICY_ID(POLICY) \