Skip to content

Commit

Permalink
Set up some DX features for OSS
Browse files Browse the repository at this point in the history
These will be helpful both in the future and when applying parts of facebook#9564.

* Set up .editorconfig to ensure consistent indents.
* Instruct CMake to export a clangd JSON compilation database that IDEs
  can integrate with.
  • Loading branch information
mszabo-wikia committed Jan 6, 2025
1 parent 3e13cb2 commit e2142db
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 e2142db

Please sign in to comment.