summaryrefslogtreecommitdiffstats
path: root/Source/cmIfCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-17 21:40:59 (GMT)
committerBrad King <brad.king@kitware.com>2007-05-17 21:40:59 (GMT)
commit9a5b4eba97628c53f051d653cdc8a301f5f32312 (patch)
tree3fbf5ecc5ac2f0467e0b7bad1a43f4fe488e0540 /Source/cmIfCommand.cxx
parentb47807fc15a35c1f9f53842b17ec283c2d3a7778 (diff)
downloadCMake-9a5b4eba97628c53f051d653cdc8a301f5f32312.zip
CMake-9a5b4eba97628c53f051d653cdc8a301f5f32312.tar.gz
CMake-9a5b4eba97628c53f051d653cdc8a301f5f32312.tar.bz2
BUG: All variable accesses should produce watch callbacks, including IF(DEFINED <var>) ones. Instead we define a new access type for IF(DEFINED) so that the error does not show up for backward compatibility variables.
Diffstat (limited to 'Source/cmIfCommand.cxx')
-rw-r--r--Source/cmIfCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx
index 2814f72..8faab58 100644
--- a/Source/cmIfCommand.cxx
+++ b/Source/cmIfCommand.cxx
@@ -307,17 +307,18 @@ bool cmIfCommand::IsTrue(const std::vector<std::string> &args,
if (*arg == "DEFINED" && argP1 != newArgs.end())
{
size_t argP1len = argP1->size();
+ bool bdef = false;
if(argP1len > 4 && argP1->substr(0, 4) == "ENV{" &&
argP1->operator[](argP1len-1) == '}')
{
std::string env = argP1->substr(4, argP1len-5);
- def = cmSystemTools::GetEnv(env.c_str());
+ bdef = cmSystemTools::GetEnv(env.c_str())?true:false;
}
else
{
- def = makefile->GetDefinitionNoWatch((argP1)->c_str());
+ bdef = makefile->IsDefinitionSet((argP1)->c_str());
}
- if(def)
+ if(bdef)
{
*arg = "1";
}