added option command

This commit is contained in:
Ken Martin 2001-04-23 16:34:12 -04:00
parent b49204ab0d
commit 619dd8c479
2 changed files with 4 additions and 13 deletions

View File

@ -47,6 +47,7 @@
#include "cmElseCommand.cxx"
#include "cmEndIfCommand.cxx"
#include "cmAddDefinitionsCommand.cxx"
#include "cmOptionCommand.cxx"
void GetPredefinedCommands(std::list<cmCommand*>& commands)
{
@ -91,6 +92,7 @@ void GetPredefinedCommands(std::list<cmCommand*>& commands)
commands.push_back(new cmElseCommand);
commands.push_back(new cmEndIfCommand);
commands.push_back(new cmAddDefinitionsCommand);
commands.push_back(new cmOptionCommand);
}

View File

@ -28,21 +28,10 @@ bool cmWrapTclCommand::Invoke(std::vector<std::string>& args)
// already, if so use that value and don't look for the program
const char* cacheValue
= cmCacheManager::GetInstance()->GetCacheValue("WRAP_TCL");
if(!cacheValue)
{
cmCacheManager::GetInstance()->AddCacheEntry("WRAP_TCL","1",
cmCacheManager::BOOL);
m_Makefile->AddDefinition("WRAP_TCL", "1");
}
else
{
m_Makefile->AddDefinition("WRAP_TCL", cacheValue);
// if it is turned off then return
if (!strcmp(cacheValue,"0"))
if(!cacheValue || !strcmp(cacheValue,"0"))
{
return true;
}
}
// add in a depend in the vtkWrapTcl executable
m_Makefile->AddUtility("vtkWrapTcl");