mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
CMake: Workaround for compile_commands.json
being incomplete
When building contrib libraries as a Sandboxed API super-project or when building Sandboxed API as a sub-project, CMake may not include all files when writing a `compile_commands.json`, leading to missing include paths for the libtooling interface generator. This change sets `CMAKE_EXPORT_COMPILE_COMMANDS` as a cache variable so that it persists across project boundaries. Writing compilation databases, even when they are otherwise unused, is harmless. PiperOrigin-RevId: 439820022 Change-Id: Ice96e78cf41fff5792aa0a8734f1ccf80f541e4c
This commit is contained in:
parent
0d833be608
commit
c6166b1364
|
@ -48,8 +48,9 @@ endif()
|
||||||
|
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
# Allow the header generator to auto-configure include paths
|
# Allow the header generator to auto-configure include paths. Need to set a
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
# cache variable, so that sub- and super-projects also have this enabled.
|
||||||
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "")
|
||||||
|
|
||||||
set(CMAKE_SKIP_BUILD_RPATH ON)
|
set(CMAKE_SKIP_BUILD_RPATH ON)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user