Files
CMake/Tests/RunCMake/ExportCompileCommands/PropertiesGenerateCommand.cmake
Shannon Booth a742b5d137 CMAKE_EXPORT_COMPILE_COMMANDS: allow configuration per target
The new target property `EXPORT_COMPILE_COMMANDS` associated with the
existing global variable can be used to optionally configure targets for
their compile commands to be exported.

Fixes: #19462
2021-01-06 11:51:39 +13:00

8 lines
223 B
CMake

enable_language(C)
add_library(Unset STATIC empty.c)
add_library(ToBeSet STATIC expected_file.c)
# Only one target with EXPORT_COMPILE_COMMANDS property.
set_property(TARGET ToBeSet PROPERTY EXPORT_COMPILE_COMMANDS TRUE)