BUG: Hack to support building existing trees with UTILITY_SOURCE commands and the new VS generator directory structure.
This commit is contained in:
parent
de217bee8d
commit
99f3b37f9c
|
@ -31,11 +31,15 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args)
|
||||||
std::string cacheEntry = *arg++;
|
std::string cacheEntry = *arg++;
|
||||||
const char* cacheValue =
|
const char* cacheValue =
|
||||||
m_Makefile->GetDefinition(cacheEntry.c_str());
|
m_Makefile->GetDefinition(cacheEntry.c_str());
|
||||||
// If it exists already, we are done.
|
// If it exists already and appears up to date then we are done. If
|
||||||
// unless this is Major
|
// the string contains "(IntDir)" but that is not the
|
||||||
|
// CMAKE_CFG_INTDIR setting then the value is out of date.
|
||||||
|
const char* intDir = m_Makefile->GetRequiredDefinition("CMAKE_CFG_INTDIR");
|
||||||
if(cacheValue &&
|
if(cacheValue &&
|
||||||
(m_Makefile->GetCacheMajorVersion() != 0
|
(strstr(cacheValue, "(IntDir)") == 0 ||
|
||||||
&& m_Makefile->GetCacheMinorVersion() != 0 ))
|
intDir && strcmp(intDir, "$(IntDir)") == 0) &&
|
||||||
|
(m_Makefile->GetCacheMajorVersion() != 0 &&
|
||||||
|
m_Makefile->GetCacheMinorVersion() != 0 ))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue