Skip to content

Commit 6ec9151

Browse files
committed
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" }
1 parent ebfb379 commit 6ec9151

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ include(CTest)
2424
# Would better fit inside GPU/CMakeLists.txt, but include GPU/Common directly
2525
set(ALIGPU_BUILD_TYPE "O2")
2626

27+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
2728
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
2829
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)
2930
set_property(GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES)

0 commit comments

Comments
 (0)