diff options
author | Alexander Neundorf <neundorf@kde.org> | 2009-05-10 09:29:10 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2009-05-10 09:29:10 (GMT) |
commit | 2ab4e7df8109548a233a39fac79a571538d4d196 (patch) | |
tree | 5abfe60310f6be19f1751478c17e56dd57205674 /Source/cmGlobalUnixMakefileGenerator3.cxx | |
parent | f114e68f7a0652b004fd771ee26c5548c7d5b266 (diff) | |
download | CMake-2ab4e7df8109548a233a39fac79a571538d4d196.zip CMake-2ab4e7df8109548a233a39fac79a571538d4d196.tar.gz CMake-2ab4e7df8109548a233a39fac79a571538d4d196.tar.bz2 |
BUG: don't report changed compiler variables if the path to the compiler
differs only e.g. a double slash somewhere instead only one slash as
directory separator (#8890)
Alex
Diffstat (limited to 'Source/cmGlobalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index bad299c..ca4c1aa3 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -95,20 +95,28 @@ void cmGlobalUnixMakefileGenerator3 std::string changeVars; if(cname && (path != cname) && (optional==false)) { - const char* cvars = - this->GetCMakeInstance()->GetProperty( - "__CMAKE_DELETE_CACHE_CHANGE_VARS_"); - if(cvars) - { - changeVars += cvars; + std::string cnameString = cname; + std::string pathString = path; + // get rid of potentially multiple slashes: + cmSystemTools::ConvertToUnixSlashes(cnameString); + cmSystemTools::ConvertToUnixSlashes(pathString); + if (cnameString != pathString) + { + const char* cvars = + this->GetCMakeInstance()->GetProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_"); + if(cvars) + { + changeVars += cvars; + changeVars += ";"; + } + changeVars += langComp; changeVars += ";"; + changeVars += cname; + this->GetCMakeInstance()->SetProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_", + changeVars.c_str()); } - changeVars += langComp; - changeVars += ";"; - changeVars += cname; - this->GetCMakeInstance()->SetProperty( - "__CMAKE_DELETE_CACHE_CHANGE_VARS_", - changeVars.c_str()); } mf->AddCacheDefinition(langComp.c_str(), path.c_str(), doc.c_str(), cmCacheManager::FILEPATH); |