Files
CMake/Tests/RunCMake/ExportCompileCommands/RunCMakeTest.cmake
Eduard Voronkin 5e25ee691a FASTBuild: generate compile_commands
If `CMAKE_EXPORT_COMPILE_COMMANDS` is set use FASTBuild's `-compdb`
option in order to generate `compile_commands.json` file.

Fixes: #27345
2025-10-29 15:53:07 -04:00

16 lines
433 B
CMake

include(RunCMake)
if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(RunCMake_TEST_OPTIONS -DCMAKE_CONFIGURATION_TYPES=Debug)
else()
set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug)
endif()
run_cmake_with_options(BeforeProject -DCMAKE_PROJECT_INCLUDE_BEFORE=BeforeProjectBEFORE.cmake)
run_cmake(CustomCompileRule)
run_cmake(Properties)
if(NOT RunCMake_GENERATOR STREQUAL "FASTBuild")
run_cmake(PropertiesGenerateCommand)
endif()