diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmIfCommand.cxx | 7 | ||||
-rw-r--r-- | Source/cmIfCommand.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 2806dd4..e82a8fb 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -408,6 +408,13 @@ namespace makefile->GetPolicies()->GetPolicyID((argP1)->c_str(), pid), reducible, arg, newArgs, argP1, argP2); } + // does a target exist + if (*arg == "TARGET" && argP1 != newArgs.end()) + { + HandlePredicate( + makefile->FindTargetToUse((argP1)->c_str())? true:false, + reducible, arg, newArgs, argP1, argP2); + } // is a variable defined if (*arg == "DEFINED" && argP1 != newArgs.end()) { diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h index cc83919..6c23aa0 100644 --- a/Source/cmIfCommand.h +++ b/Source/cmIfCommand.h @@ -142,6 +142,8 @@ public: " if(POLICY policy-id)\n" "True if the given name is an existing policy " "(of the form CMP<NNNN>).\n" + " if(TARGET target-name)\n" + "True if the given name is an existing target, built or imported.\n" " if(EXISTS file-name)\n" " if(EXISTS directory-name)\n" "True if the named file or directory exists. " |