Merge pull request #8388 from jordan-woyak/cmake-export-compile-commands

CMake: Enable generation of compile_commands.json.
This commit is contained in:
Connor McLaughlin 2019-11-08 11:07:06 +10:00 committed by GitHub
commit 729308979d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if (MSVC)
# TODO: Use https://cmake.org/cmake/help/latest/policy/CMP0092.html instead (once we can require CMake >= 3.15)