Skip to content

Commit 41db10d

Browse files
mszabo-wikiafacebook-github-bot
authored andcommitted
Set up some DX features for OSS (#9565)
Summary: These will be helpful both in the future and when applying parts of #9564. * Set up .editorconfig to ensure consistent indents. * Instruct CMake to export a clangd JSON compilation database that IDEs can integrate with. Pull Request resolved: #9565 Reviewed By: Wilfred Differential Revision: D67870812 fbshipit-source-id: 8d1db6b9002e65e8cf52d0a0d005ed4fe49259cf
1 parent df48bbf commit 41db10d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[{CMakeLists.txt,*.cmake,*.h,*.cpp}]
2+
indent_style = space
3+
indent_size = 2

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,6 @@ CPackSourceConfig.cmake
100100

101101
# python scripts
102102
*.pyc
103+
104+
# clangd JSON Compilation Database
105+
compile_commands.json

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ cmake_policy(SET CMP0046 NEW)
99
# projects are created.
1010
INCLUDE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/VisualStudioToolset.cmake")
1111

12+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
13+
1214
# includes
1315
SET(
1416
CMAKE_MODULE_PATH

0 commit comments

Comments
 (0)