Enable clangd support. (#8104)
* Enable clangd support. * Disable CMAKE_EXPORT_COMPILE_COMMANDS by default. * Revert unwanted target rename.
This commit is contained in:
parent
aa9d95eb21
commit
908c203fca
|
@ -0,0 +1,2 @@
|
||||||
|
CompileFlags:
|
||||||
|
CompilationDatabase: "@CMAKE_CURRENT_BINARY_DIR@"
|
|
@ -18,6 +18,7 @@ cmake_policy (SET CMP0091 NEW)
|
||||||
cmake_policy (SET CMP0074 NEW)
|
cmake_policy (SET CMP0074 NEW)
|
||||||
cmake_policy (SET CMP0077 NEW)
|
cmake_policy (SET CMP0077 NEW)
|
||||||
cmake_policy (SET CMP0117 NEW)
|
cmake_policy (SET CMP0117 NEW)
|
||||||
|
|
||||||
if (${CMAKE_MINOR_VERSION} GREATER_EQUAL 24)
|
if (${CMAKE_MINOR_VERSION} GREATER_EQUAL 24)
|
||||||
cmake_policy (SET CMP0135 NEW)
|
cmake_policy (SET CMP0135 NEW)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -121,3 +122,10 @@ file (
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/Help.md
|
${CMAKE_CURRENT_BINARY_DIR}/Help.md
|
||||||
${CARLA_CMAKE_HELP_MESSAGE}
|
${CARLA_CMAKE_HELP_MESSAGE}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (CMAKE_EXPORT_COMPILE_COMMANDS)
|
||||||
|
configure_file (
|
||||||
|
${CARLA_WORKSPACE_PATH}/.clangd.in
|
||||||
|
${CARLA_WORKSPACE_PATH}/.clangd
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
Loading…
Reference in New Issue