Skip to content

Commit 9091bbd

Browse files
committed
Enable CMAKE_EXPORT_COMPILE_COMMANDS for SonarLint
1 parent 786c0a4 commit 9091bbd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ cmake_policy(SET CMP0091 NEW)
99
# Do not set default MSVC warning flags: https://cmake.org/cmake/help/latest/policy/CMP0092.html
1010
cmake_policy(SET CMP0092 NEW)
1111

12+
# Export compile commands for other tools, e.g. SonarLint.
13+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
14+
1215
# Default to the last updated version from version.txt.
1316
file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.txt" VERSION_FILE)
1417
file(READ "${VERSION_FILE}" LATEST_VERSION)

0 commit comments

Comments
 (0)