diff options
author | Brad King <brad.king@kitware.com> | 2005-07-27 20:37:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2005-07-27 20:37:44 (GMT) |
commit | 99f3b37f9c513c85063a85608c2737ee51a3eb36 (patch) | |
tree | 061e705978ed1a61d313021c88a5ab091fb96920 /Source/cmUtilitySourceCommand.cxx | |
parent | de217bee8d77a4287efe81731311d0cf3c89c2c8 (diff) | |
download | CMake-99f3b37f9c513c85063a85608c2737ee51a3eb36.zip CMake-99f3b37f9c513c85063a85608c2737ee51a3eb36.tar.gz CMake-99f3b37f9c513c85063a85608c2737ee51a3eb36.tar.bz2 |
BUG: Hack to support building existing trees with UTILITY_SOURCE commands and the new VS generator directory structure.
Diffstat (limited to 'Source/cmUtilitySourceCommand.cxx')
-rw-r--r-- | Source/cmUtilitySourceCommand.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 3f5d13d..425637f 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -31,11 +31,15 @@ bool cmUtilitySourceCommand::InitialPass(std::vector<std::string> const& args) std::string cacheEntry = *arg++; const char* cacheValue = m_Makefile->GetDefinition(cacheEntry.c_str()); - // If it exists already, we are done. - // unless this is Major - if(cacheValue && - (m_Makefile->GetCacheMajorVersion() != 0 - && m_Makefile->GetCacheMinorVersion() != 0 )) + // If it exists already and appears up to date then we are done. If + // 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 && + (strstr(cacheValue, "(IntDir)") == 0 || + intDir && strcmp(intDir, "$(IntDir)") == 0) && + (m_Makefile->GetCacheMajorVersion() != 0 && + m_Makefile->GetCacheMinorVersion() != 0 )) { return true; } |