mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
Enable CMake "compile_commands.json" Output (#3854)
Co-authored-by: John Tramm <jtramm@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
dbfd6387b2
commit
533f09defd
1 changed files with 5 additions and 0 deletions
|
|
@ -20,6 +20,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# Generate compile_commands.json for clangd and other tools
|
||||
if("${CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
endif()
|
||||
|
||||
# Enable correct usage of CXX_EXTENSIONS
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.22)
|
||||
cmake_policy(SET CMP0128 NEW)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue