summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalData.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-01-30 19:44:49 (GMT)
committerBrad King <brad.king@kitware.com>2013-01-30 19:55:12 (GMT)
commite2e0d2e3c7108d5ce41f032ad9089155c6b4735c (patch)
tree35f65eec3eb7fa5c739f19cee30a44f94e1decb1 /Modules/ExternalData.cmake
parentee2abfdc8913e4e9a5bc77c56a9d3dea83fde6f1 (diff)
downloadCMake-e2e0d2e3c7108d5ce41f032ad9089155c6b4735c.zip
CMake-e2e0d2e3c7108d5ce41f032ad9089155c6b4735c.tar.gz
CMake-e2e0d2e3c7108d5ce41f032ad9089155c6b4735c.tar.bz2
ExternalData: Collapse ../ components in DATA{} paths
Relative path components need to be normalized out even if they appear in the middle of a caller-supplied string.
Diffstat (limited to 'Modules/ExternalData.cmake')
-rw-r--r--Modules/ExternalData.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/ExternalData.cmake b/Modules/ExternalData.cmake
index 26b0f99..825b7b8 100644
--- a/Modules/ExternalData.cmake
+++ b/Modules/ExternalData.cmake
@@ -334,8 +334,9 @@ function(_ExternalData_arg target arg options var_file)
if(IS_ABSOLUTE "${data}")
set(absdata "${data}")
else()
- get_filename_component(absdata "${CMAKE_CURRENT_SOURCE_DIR}/${data}" ABSOLUTE)
+ set(absdata "${CMAKE_CURRENT_SOURCE_DIR}/${data}")
endif()
+ get_filename_component(absdata "${absdata}" ABSOLUTE)
# Convert to relative path under the source tree.
if(NOT ExternalData_SOURCE_ROOT)