From 760464c6b14d8f573d49ce67fbdabe490c4912d3 Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 1 Aug 2023 10:55:36 +0200 Subject: Add compile_commands --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ec83a..8a18c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,10 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Release") set(${CMAKE_INTERPROCEDURAL_OPTIMIZATION} TRUE) endif() +if(DAW_BUILD_DEBUG AND NOT_SUBPROJECT) + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +endif() + if(DAW_BUILD_UBSAN AND DAW_BUILD_ASAN) message(FATAL_ERROR "You cannot build both asan and ubsan") endif() -- cgit v1.3