cmState: Add API for cache version.

This commit is contained in:
Stephen Kelly
2015-10-10 14:34:26 +02:00
parent 95b0d761a7
commit b5212c68de
4 changed files with 21 additions and 10 deletions
+4 -6
View File
@@ -11,8 +11,6 @@
============================================================================*/
#include "cmUtilitySourceCommand.h"
#include "cmCacheManager.h"
// cmUtilitySourceCommand
bool cmUtilitySourceCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
@@ -54,13 +52,13 @@ bool cmUtilitySourceCommand
}
else
{
cmCacheManager *manager =
this->Makefile->GetCMakeInstance()->GetCacheManager();
cmState *state =
this->Makefile->GetState();
haveCacheValue = (cacheValue &&
(strstr(cacheValue, "(IntDir)") == 0 ||
(intDir && strcmp(intDir, "$(IntDir)") == 0)) &&
(manager->GetCacheMajorVersion() != 0 &&
manager->GetCacheMinorVersion() != 0 ));
(state->GetCacheMajorVersion() != 0 &&
state->GetCacheMinorVersion() != 0 ));
}
if(haveCacheValue)