summaryrefslogtreecommitdiffstats
path: root/Help
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 /Help
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 'Help')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index b1b1102..b6d97d1 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -120,6 +120,16 @@ Available logical expressions are:
add_executable(myapp main.cpp)
target_link_libraries(myapp myapp_c myapp_cxx)
+ The ``Makefile`` and ``Ninja`` based generators can also use this
+ expression to specify compile-language specific compile definitions:
+
+ .. code-block:: cmake
+
+ add_executable(myapp main.cpp foo.c bar.cpp)
+ target_compile_definitions(myapp
+ PRIVATE $<$<COMPILE_LANGUAGE:CXX>:COMPILING_CXX>
+ )
+
Informational Expressions
=========================