diff options
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 185bff9..1606eec 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -28,6 +28,7 @@ #include "cm_codecvt_Encoding.hxx" #include "cmAlgorithms.h" +#include "cmCMakePath.h" #include "cmCPackPropertiesGenerator.h" #include "cmComputeTargetDepends.h" #include "cmCryptoHash.h" @@ -270,17 +271,14 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string& lang, std::string changeVars; if (cname && !optional) { - std::string cnameString; + cmCMakePath cachedPath; if (!cmSystemTools::FileIsFullPath(*cname)) { - cnameString = cmSystemTools::FindProgram(*cname); + cachedPath = cmSystemTools::FindProgram(*cname); } else { - cnameString = *cname; + cachedPath = *cname; } - std::string pathString = path; - // get rid of potentially multiple slashes: - cmSystemTools::ConvertToUnixSlashes(cnameString); - cmSystemTools::ConvertToUnixSlashes(pathString); - if (cnameString != pathString) { + cmCMakePath foundPath = path; + if (foundPath.Normal() != cachedPath.Normal()) { cmValue cvars = this->GetCMakeInstance()->GetState()->GetGlobalProperty( "__CMAKE_DELETE_CACHE_CHANGE_VARS_"); if (cvars) { |