[llvm] [CMake] Align CMAKE_EXPORT_COMPILE_COMMANDS from 1 to ON (PR #184971)

Tomer Shafir via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 01:24:06 PST 2026


https://github.com/tomershafir created https://github.com/llvm/llvm-project/pull/184971

ON/OFF are more conventional in the project for boolean CMake variables.

>From 23eecad39c8f1539eb9771cc986f964c71ec1779 Mon Sep 17 00:00:00 2001
From: tomershafir <tomer.shafir8 at gmail.com>
Date: Fri, 6 Mar 2026 11:23:22 +0200
Subject: [PATCH] [CMake] Align CMAKE_EXPORT_COMPILE_COMMANDS from 1 to ON

ON/OFF are more conventional in the project for boolean CMake variables.
---
 llvm/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index dbf8b9e4aa661..9771e209ae081 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -381,7 +381,7 @@ list(INSERT CMAKE_MODULE_PATH 0
 
 # Generate a CompilationDatabase (compile_commands.json file) for our build,
 # for use by clang_complete, YouCompleteMe, etc.
-set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
 option(LLVM_INSTALL_BINUTILS_SYMLINKS
   "Install symlinks from the binutils tool names to the corresponding LLVM tools." OFF)



More information about the llvm-commits mailing list