summaryrefslogtreecommitdiff
path: root/Source/cmIfCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-08-20 11:45:16 -0400
committerBrad King <brad.king@kitware.com>2008-08-20 11:45:16 -0400
commitfff812db95cea0844833e1cde2942ee52bffe911 (patch)
treefe64788489c02832604f6119a24ba2ff04428b67 /Source/cmIfCommand.h
parent07665de0386e3ee572e95f999d6b516391331e26 (diff)
downloadcmake-fff812db95cea0844833e1cde2942ee52bffe911.tar.gz
ENH: Add if(TARGET) command
It is useful to be able to test if a target has been created. Often targets are created only inside conditions. Rather than storing the result of the condition manually for testing by other parts of the project, it is much easier for the other parts to just test for the target's existence. This will also be useful when find-modules start reporting results with IMPORTED targets and projects want to test if a certain target is available.
Diffstat (limited to 'Source/cmIfCommand.h')
-rw-r--r--Source/cmIfCommand.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h
index cc83919b35..6c23aa0f5a 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. "