summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-05-11 14:19:58 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-05-11 14:19:58 (GMT)
commit25f75d90756fcd991554c3d5d0bb747ea4158dfd (patch)
treeceaf0e283ad2a64ef5279a0044904b0bb10c3d4a /Source/cmGlobalGenerator.cxx
parent4b1c392c9c441437a00d0be3c2da0fd0b103777f (diff)
downloadCMake-25f75d90756fcd991554c3d5d0bb747ea4158dfd.zip
CMake-25f75d90756fcd991554c3d5d0bb747ea4158dfd.tar.gz
CMake-25f75d90756fcd991554c3d5d0bb747ea4158dfd.tar.bz2
ENH: added new methods to convert to HomeRelative paths
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx23
1 files changed, 21 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 9ebdcad..bb0d152 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -491,6 +491,12 @@ void cmGlobalGenerator::ClearEnabledLanguages()
void cmGlobalGenerator::Configure()
{
+ // Setup the current output directory components for use by
+ // ConvertToRelativePath.
+ std::string outdir =
+ cmSystemTools::CollapseFullPath(m_CMakeInstance->GetHomeOutputDirectory());
+ cmSystemTools::SplitPath(outdir.c_str(), m_HomeOutputDirectoryComponents);
+
// Delete any existing cmLocalGenerators
unsigned int i;
for (i = 0; i < m_LocalGenerators.size(); ++i)
@@ -522,8 +528,7 @@ void cmGlobalGenerator::Configure()
sprintf(num,"%d",static_cast<int>(m_LocalGenerators.size()));
this->GetCMakeInstance()->AddCacheEntry
("CMAKE_NUMBER_OF_LOCAL_GENERATORS", num,
- "number of local generators",
- cmCacheManager::INTERNAL);
+ "number of local generators", cmCacheManager::INTERNAL);
std::set<cmStdString> notFoundMap;
// after it is all done do a ConfigureFinalPass
@@ -1091,3 +1096,17 @@ void cmGlobalGenerator::SetupTests()
}
+//----------------------------------------------------------------------------
+std::string cmGlobalGenerator::ConvertToHomeRelativePath(const char* remote)
+{
+ return (this->ConvertToRelativePath(m_HomeOutputDirectoryComponents,remote));
+}
+
+//----------------------------------------------------------------------------
+std::string
+cmGlobalGenerator::ConvertToHomeRelativeOutputPath(const char* remote)
+{
+ return cmSystemTools::ConvertToOutputPath
+ (this->ConvertToRelativePath(m_HomeOutputDirectoryComponents,remote).c_str());
+}
+