summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-10-16 19:18:03 (GMT)
committerBrad King <brad.king@kitware.com>2006-10-16 19:18:03 (GMT)
commit30235517f81ed7ef8ff8e58685e786da472bf0d6 (patch)
treec8c2162c4b697b476e2de36b4153d22fbfe0d274
parent49bf0b9e3d48dd650daa924a238fccc1bc3324d7 (diff)
downloadCMake-30235517f81ed7ef8ff8e58685e786da472bf0d6.zip
CMake-30235517f81ed7ef8ff8e58685e786da472bf0d6.tar.gz
CMake-30235517f81ed7ef8ff8e58685e786da472bf0d6.tar.bz2
BUG: Need to collapse path argument to get_directory_property. This addresses bug#3847.
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx4
-rw-r--r--Tests/OutOfSource/CMakeLists.txt4
2 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index 8d08c6b..278e2ae 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -53,6 +53,10 @@ bool cmGetDirectoryPropertyCommand::InitialPass(
sd += "/";
sd += *i;
}
+
+ // The local generators are associated with collapsed paths.
+ sd = cmSystemTools::CollapseFullPath(sd.c_str());
+
// lookup the makefile from the directory name
cmLocalGenerator *lg =
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
diff --git a/Tests/OutOfSource/CMakeLists.txt b/Tests/OutOfSource/CMakeLists.txt
index a053f14..265d47d 100644
--- a/Tests/OutOfSource/CMakeLists.txt
+++ b/Tests/OutOfSource/CMakeLists.txt
@@ -4,6 +4,10 @@ project (OutOfSource)
add_subdirectory(SubDir)
get_directory_property(ANIMAL DIRECTORY OutOfSourceSubdir DEFINITION WEASELS)
+get_directory_property(ANIMALREL DIRECTORY SubDir/../OutOfSourceSubdir DEFINITION WEASELS)
+IF(NOT "${ANIMAL}" STREQUAL "${ANIMALREL}")
+ MESSAGE(FATAL_ERROR "GET_DIRECTORY_PROPERTY does not seem to collapse paths.")
+ENDIF(NOT "${ANIMAL}" STREQUAL "${ANIMALREL}")
configure_file(
${OutOfSource_SOURCE_DIR}/testdp.h.in