diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000000..a43ec75b0ae2b0 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +[{CMakeLists.txt,*.cmake,*.h,*.cpp}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore index 392c8a15b1ff41..881ca58c8b012a 100644 --- a/.gitignore +++ b/.gitignore @@ -100,3 +100,6 @@ CPackSourceConfig.cmake # python scripts *.pyc + +# clangd JSON Compilation Database +compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt index 21225c1259a5b3..e3d8479c650993 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,8 @@ cmake_policy(SET CMP0046 NEW) # projects are created. INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/VisualStudioToolset.cmake") +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + # includes SET( CMAKE_MODULE_PATH