Skip to content

Commit

Permalink
Set up some DX features for OSS (#9565)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mszabo-wikia authored and facebook-github-bot committed Jan 9, 2025
1 parent df48bbf commit 41db10d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[{CMakeLists.txt,*.cmake,*.h,*.cpp}]
indent_style = space
indent_size = 2
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ CPackSourceConfig.cmake

# python scripts
*.pyc

# clangd JSON Compilation Database
compile_commands.json
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 41db10d

Please sign in to comment.