diff options
author | Stephen Kelly <steveire@gmail.com> | 2012-11-19 22:56:12 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-01-13 23:08:47 (GMT) |
commit | 2bee6f5ba5b3f33817cc00e056a7df60d05c9399 (patch) | |
tree | dd762381e9921188650734c85cdb22f4f6243333 /Tests/CMakeCommands/target_compile_definitions/consumer.cpp | |
parent | 3367d0cc7fe50e6b6fc06c85c8c38c683c1d3805 (diff) | |
download | CMake-2bee6f5ba5b3f33817cc00e056a7df60d05c9399.zip CMake-2bee6f5ba5b3f33817cc00e056a7df60d05c9399.tar.gz CMake-2bee6f5ba5b3f33817cc00e056a7df60d05c9399.tar.bz2 |
Add the TARGET_DEFINED generator expression
This tests whether the parameter is a usable target.
Diffstat (limited to 'Tests/CMakeCommands/target_compile_definitions/consumer.cpp')
-rw-r--r-- | Tests/CMakeCommands/target_compile_definitions/consumer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp index e3788dd..1ef657d 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp @@ -15,4 +15,12 @@ #error Expected MY_IMPORTEDINTERFACE_DEFINE #endif +#ifdef SHOULD_NOT_BE_DEFINED +#error Unexpected SHOULD_NOT_BE_DEFINED +#endif + +#ifndef SHOULD_BE_DEFINED +#error Expected SHOULD_BE_DEFINED +#endif + int main() { return 0; } |