diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index e2512c980..43d97b3f6 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -90,7 +90,7 @@ void cmGlobalUnixMakefileGenerator3 const char* cname = this->GetCMakeInstance()-> GetCacheManager()->GetCacheValue(langComp.c_str()); std::string changeVars; - if(cname && (path != cname)) + if(cname && (path != cname) && (optional==false)) { const char* cvars = this->GetCMakeInstance()->GetProperty(