summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeCommands/target_compile_definitions/consumer.c
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-03-04 20:46:42 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-03-09 19:49:16 (GMT)
commit0b945ea9a6a38d1b3ee27cc32afb4268bd571600 (patch)
tree79411aba297b00a76587c9bd855e3a9e5afa3e10 /Tests/CMakeCommands/target_compile_definitions/consumer.c
parent5c559f11137dcb14113a3c5df99ff896c65c7596 (diff)
downloadCMake-0b945ea9a6a38d1b3ee27cc32afb4268bd571600.zip
CMake-0b945ea9a6a38d1b3ee27cc32afb4268bd571600.tar.gz
CMake-0b945ea9a6a38d1b3ee27cc32afb4268bd571600.tar.bz2
Genex: Allow COMPILE_LANGUAGE when processing compile definitions.
Issue an error if this is encountered by an IDE generator.
Diffstat (limited to 'Tests/CMakeCommands/target_compile_definitions/consumer.c')
-rw-r--r--Tests/CMakeCommands/target_compile_definitions/consumer.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.c b/Tests/CMakeCommands/target_compile_definitions/consumer.c
new file mode 100644
index 0000000..5796d96
--- /dev/null
+++ b/Tests/CMakeCommands/target_compile_definitions/consumer.c
@@ -0,0 +1,23 @@
+
+#ifdef TEST_LANG_DEFINES
+ #ifdef CONSUMER_LANG_CXX
+ #error Unexpected CONSUMER_LANG_CXX
+ #endif
+
+ #ifndef CONSUMER_LANG_C
+ #error Expected CONSUMER_LANG_C
+ #endif
+
+ #if !LANG_IS_C
+ #error Expected LANG_IS_C
+ #endif
+
+ #if LANG_IS_CXX
+ #error Unexpected LANG_IS_CXX
+ #endif
+#endif
+
+void consumer_c()
+{
+
+}