diff options
author | Brad King <brad.king@kitware.com> | 2007-03-16 20:48:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-03-16 20:48:27 (GMT) |
commit | 144c60552566e21cd57b7be498be53b1c3a24ece (patch) | |
tree | 8b8b7f86328be56511d1a1e3fb26f9fe8c5078ca /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | 7fb8ac89041e1f2e1193295800d722c3a7a6cd6e (diff) | |
download | CMake-144c60552566e21cd57b7be498be53b1c3a24ece.zip CMake-144c60552566e21cd57b7be498be53b1c3a24ece.tar.gz CMake-144c60552566e21cd57b7be498be53b1c3a24ece.tar.bz2 |
BUG: Need to include relative path top information in directory information so that relative path conversion during dependency generation works with the same rules as project generation.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 5dc1384..008061a 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -411,6 +411,15 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() // Write the do not edit header. this->WriteDisclaimer(infoFileStream); + // Setup relative path conversion tops. + infoFileStream + << "# Relative path conversion top directories.\n" + << "SET(CMAKE_RELATIVE_PATH_TOP_SOURCE \"" << this->RelativePathTopSource + << "\")\n" + << "SET(CMAKE_RELATIVE_PATH_TOP_BINARY \"" << this->RelativePathTopBinary + << "\")\n" + << "\n"; + // Tell the dependency scanner to use unix paths if necessary. if(cmSystemTools::GetForceUnixPaths()) { @@ -1155,10 +1164,11 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo) { cmSystemTools::Error("Target DependInfo.cmake file not found"); } - - // Test whether we need to force Unix paths. + + // Lookup useful directory information. if(haveDirectoryInfo) { + // Test whether we need to force Unix paths. if(const char* force = mf->GetDefinition("CMAKE_FORCE_UNIX_PATHS")) { if(!cmSystemTools::IsOff(force)) @@ -1166,6 +1176,19 @@ bool cmLocalUnixMakefileGenerator3::ScanDependencies(const char* tgtInfo) cmSystemTools::SetForceUnixPaths(true); } } + + // Setup relative path top directories. + this->RelativePathsConfigured = true; + if(const char* relativePathTopSource = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE")) + { + this->RelativePathTopSource = relativePathTopSource; + } + if(const char* relativePathTopBinary = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY")) + { + this->RelativePathTopBinary = relativePathTopBinary; + } } else { |