diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..890d8914a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "C_Cpp.default.compileCommands": "${config:cmake.buildDirectory}/compile_commands.json", + "cmake.mergedCompileCommands": "${config:cmake.buildDirectory}/compile_commands.json", + "clangd.arguments": [ + "--compile-commands-dir=${config:cmake.buildDirectory}/" + ], +} diff --git a/cmake/RobotologySuperbuildOptions.cmake b/cmake/RobotologySuperbuildOptions.cmake index b53ae155e..607d0574a 100644 --- a/cmake/RobotologySuperbuildOptions.cmake +++ b/cmake/RobotologySuperbuildOptions.cmake @@ -3,6 +3,9 @@ set(YCM_USE_CMAKE_PROPOSED TRUE CACHE BOOL "Use files including unmerged cmake patches") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile commands during generation.") +mark_as_advanced(CMAKE_EXPORT_COMPILE_COMMANDS) + # YCM options option(YCM_DISABLE_SYSTEM_PACKAGES "Disable use of all the system installed packages" ON)