From 6ec91511098f745f442f020362095ec2f71c78ff Mon Sep 17 00:00:00 2001 From: shahoian Date: Fri, 4 Sep 2026 14:03:08 +0200 Subject: [PATCH] generate compile_commands.json, e.g. to be used by VS Code intellisense To tell to vsclode the path to include files add to O2/.vscode/settings.json { "C_Cpp.default.compileCommands": "${ALIBUILD_WORK_DIR}/BUILD/O2-latest/O2/compile_commands.json" } --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index adecffc0f4dbf..2d4b0be31234b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ include(CTest) # Would better fit inside GPU/CMakeLists.txt, but include GPU/Common directly set(ALIGPU_BUILD_TYPE "O2") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER) set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES)