Configure CMake to export compile_commands.json (#2645)

This helps enable LSP for code navigation using clangd.
This commit is contained in:
Andrey Portnoy
2025-10-02 18:40:32 -04:00
committed by GitHub
parent 1c9ae1eaa1
commit 287c63a093

View File

@@ -26,6 +26,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_INSTALL_MESSAGE NEVER)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# ----------------------------- Configuration -----------------------------
option(MLX_BUILD_TESTS "Build tests for mlx" ON)