File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ if (SUPPORT_CLANGD)
22
22
set (CLANGD_SRC ${CMAKE_CURRENT_SOURCE_DIR} /cmake/.clangd.in )
23
23
set (CLANGD_DEST ${CMAKE_CURRENT_SOURCE_DIR} /.clangd )
24
24
if (EMSCRIPTEN )
25
+ add_custom_target (create_compile_commands ALL )
25
26
set (CMAKE_EXPORT_COMPILE_COMMANDS OFF )
26
27
set (CMAKE_EXPORT_COMPILE_COMMANDS
27
28
OFF
@@ -43,7 +44,7 @@ if (SUPPORT_CLANGD)
43
44
"-MJ ${CMAKE_CURRENT_BINARY_DIR} /compile_commands/compile_commands_${s_name} .json"
44
45
)
45
46
set_property (
46
- TARGET ${PROJECT_NAME}
47
+ GLOBAL
47
48
APPEND
48
49
PROPERTY
49
50
ADDITIONAL_CLEAN_FILES
@@ -52,7 +53,7 @@ if (SUPPORT_CLANGD)
52
53
endforeach ()
53
54
endforeach ()
54
55
add_custom_command (
55
- TARGET ${PROJECT_NAME}
56
+ TARGET create_compile_commands
56
57
POST_BUILD
57
58
COMMAND
58
59
${CMAKE_COMMAND}
You can’t perform that action at this time.
0 commit comments