mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 23:00:07 -06:00
Evaluate to false on `$<COMPILE_LANGUAGE:Lang>` if language `Lang` is not loaded. This is helpful in exported targets consumed in other projects that may not enable all the same languages. Fixes: #17952
5 lines
152 B
CMake
5 lines
152 B
CMake
|
|
enable_language(C)
|
|
add_executable(empty empty.c)
|
|
target_compile_options(empty PRIVATE $<$<COMPILE_LANGUAGE:CXX>:$<TARGET_EXISTS:too,many,parameters>>)
|