|
|
@@ -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) {
|