summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-06-19 18:57:57 (GMT)
committerBrad King <brad.king@kitware.com>2006-06-19 18:57:57 (GMT)
commit15ca72a862ce23f2b9738255d11168b57ef656a8 (patch)
tree07d32976a2e6e137754ac68f8cfa57d9f89446f8
parenta6bf59baefe94ce04ba3e67d3e3ae415fc58533a (diff)
downloadCMake-15ca72a862ce23f2b9738255d11168b57ef656a8.zip
CMake-15ca72a862ce23f2b9738255d11168b57ef656a8.tar.gz
CMake-15ca72a862ce23f2b9738255d11168b57ef656a8.tar.bz2
BUG: Delay relative path configuration until as late as possible to make sure the source/binary dir are set. This is a work-around for lack of a more structured way of creating the global generator.
-rw-r--r--Source/cmGlobalGenerator.cxx13
-rw-r--r--Source/cmGlobalGenerator.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d840b8a..49b0e1e 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -39,6 +39,9 @@ cmGlobalGenerator::cmGlobalGenerator()
// By default do not use link scripts.
this->UseLinkScript = false;
+
+ // Relative paths are not configured in the constructor.
+ this->RelativePathsConfigured = false;
}
cmGlobalGenerator::~cmGlobalGenerator()
@@ -1098,6 +1101,13 @@ std::string cmGlobalGenerator
return in_remote;
}
+ // Make sure relative path conversion is configured.
+ if(!this->RelativePathsConfigured)
+ {
+ this->ConfigureRelativePaths();
+ this->RelativePathsConfigured = true;
+ }
+
std::string original = in_remote;
// Skip conversion if the path and local are not both in the source or both
@@ -1224,9 +1234,6 @@ void cmGlobalGenerator::SetCMakeInstance(cmake* cm)
{
// Store a pointer to the cmake object instance.
this->CMakeInstance = cm;
-
- // Setup relative path conversion for the instance.
- this->ConfigureRelativePaths();
}
void cmGlobalGenerator::SetupTests()
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 7a05783..07ee8d8 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -200,6 +200,7 @@ protected:
bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen);
void ConfigureRelativePaths();
+ bool RelativePathsConfigured;
void SetupTests();
void CreateDefaultGlobalTargets(cmTargets* targets);