Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Commit

Permalink
Generate compile_commands.json
Browse files Browse the repository at this point in the history
This file is used with tooling like IDEs to get autocompletion and other
features that need to be aware of compile flags used on each source
file. Seems to affect build performance minimally, and only takes a few
MB of disk space when populated. I think it makes sense to turn it on
globally so that it's there when tools/IDEs need it.
  • Loading branch information
Zach Nation authored and Yucheng Low committed Jan 16, 2018
1 parent 3bd9c95 commit 348ee60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Expand Up @@ -94,3 +94,8 @@ deps/build
doc/

/dummy.cpp

# compile_commands.json - http://clang.llvm.org/docs/JSONCompilationDatabase.html
# generated by CMake + clang - Symlink debug/compile_commands.json (or release)
# to the root of the project for most tooling to work. This ignores the symlink.
/compile_commands.json
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -16,6 +16,10 @@ cmake_policy(SET CMP0046 OLD)
cmake_policy(SET CMP0042 NEW)
endif()

# Generate a compilation database for use with automated tools like IDE/editor
# plugins. See http://clang.llvm.org/docs/JSONCompilationDatabase.html
set( CMAKE_EXPORT_COMPILE_COMMANDS ON )

# Determine where additional Turi specific cmake modules are
# defined
set(DEPS_CMAKE ${CMAKE_SOURCE_DIR}/deps/cmake)
Expand Down

0 comments on commit 348ee60

Please sign in to comment.