summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 691d80d..77cd6c6 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -51,12 +51,14 @@ void CCONV cmSetError(void *info, const char *err)
unsigned int CCONV cmGetCacheMajorVersion(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
- return mf->GetCacheMajorVersion();
+ cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager();
+ return manager->GetCacheMajorVersion();
}
unsigned int CCONV cmGetCacheMinorVersion(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
- return mf->GetCacheMinorVersion();
+ cmCacheManager *manager = mf->GetCMakeInstance()->GetCacheManager();
+ return manager->GetCacheMinorVersion();
}
unsigned int CCONV cmGetMajorVersion(void *)
@@ -85,27 +87,27 @@ void CCONV cmAddCacheDefinition(void *arg, const char* name,
{
case CM_CACHE_BOOL:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::BOOL);
+ cmState::BOOL);
break;
case CM_CACHE_PATH:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::PATH);
+ cmState::PATH);
break;
case CM_CACHE_FILEPATH:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::FILEPATH);
+ cmState::FILEPATH);
break;
case CM_CACHE_STRING:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::STRING);
+ cmState::STRING);
break;
case CM_CACHE_INTERNAL:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::INTERNAL);
+ cmState::INTERNAL);
break;
case CM_CACHE_STATIC:
mf->AddCacheDefinition(name,value,doc,
- cmCacheManager::STATIC);
+ cmState::STATIC);
break;
}
}
@@ -162,7 +164,7 @@ int CCONV cmIsOn(void *arg, const char* name)
int CCONV cmCommandExists(void *arg, const char* name)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
- return static_cast<int>(mf->CommandExists(name));
+ return static_cast<int>(mf->GetState()->GetCommand(name) ? 1 : 0);
}
void CCONV cmAddDefineFlag(void *arg, const char* definition)
@@ -865,7 +867,7 @@ void CCONV DefineSourceFileProperty (void *arg, const char *name,
int chained)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
- mf->GetCMakeInstance()->DefineProperty(name,cmProperty::SOURCE_FILE,
+ mf->GetState()->DefineProperty(name,cmProperty::SOURCE_FILE,
briefDocs, longDocs,
chained != 0);
}