CREATE_PROJECT: export compile_commands.json via cmake

this is useful for e.g. clangd or other clang based tools like the analyser
This commit is contained in:
Martin Gerhardy 2020-10-14 16:38:20 +02:00 committed by Eugene Sandulenko
parent d7a13e5831
commit 332c826b4b

View File

@ -81,6 +81,8 @@ void CMakeProvider::createWorkspace(const BuildSetup &setup) {
workspace << "cmake_minimum_required(VERSION 3.2)\n"
"project(" << setup.projectDescription << ")\n\n";
workspace << "set(CMAKE_EXPORT_COMPILE_COMMANDS ON)\n";
workspace << "# Define the engines and subengines\n";
writeEngines(setup, workspace);
writeSubEngines(setup, workspace);