From 035c187cd1503ce004b795a9d54af4568485dfc4 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Fri, 6 Oct 2023 16:59:19 -0400 Subject: [PATCH] cmake: remove not-working guards on CMAKE_EXPORT_COMPILE_COMMANDS --- cmake/xo_cxx.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/xo_cxx.cmake b/cmake/xo_cxx.cmake index e540bc75..7eaaaff9 100644 --- a/cmake/xo_cxx.cmake +++ b/cmake/xo_cxx.cmake @@ -37,9 +37,9 @@ macro(xo_toplevel_compile_options) # writes ${PROJECT_BINARY_DIR}/compile_commands.json; # (symlink from toplevel git dir to tell LSP how to build) # - if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") - endif() + # note: trying to protect this with if(NOT DEFINED ..) is /not/ effective + # + set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE INTERNAL "") if(NOT CMAKE_INSTALL_RPATH) set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib CACHE STRING