build: Flatten include dirs when building comp db

This commit is contained in:
rowanG077 2023-06-07 17:12:17 +02:00 committed by myrtle
parent cb4846a58d
commit 8a79a3522c

View File

@ -6,6 +6,14 @@ include(CheckCXXCompilerFlag)
# Allow family.cmake add additional dependencies to gui_${family}.
cmake_policy(SET CMP0079 NEW)
# We want to explictly include all include directories when generating the
# compilation database as not all clang/gcc share the same implicit includes
# leading to essentially non-working compile_commands.json
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
# Enable IPO support.
cmake_policy(SET CMP0069 NEW)
include(CheckIPOSupported)