Attention is currently required from: flichtenheld, plaisthos.

Hello flichtenheld, plaisthos,

I'd like you to reexamine a change. Please visit

to look at the new patch set (#2).

Change subject: cmake: create and link compile_commands.json file

cmake: create and link compile_commands.json file

CMake has support to create a json file which contains exact information
how each file in the project is compiled. This file can be consumed by
clangd, which in turn provides precise symbol information to IDEs for
better code navigation and contextual information.

I use it with vscode to be able to quickly switch between native Linux and
mingw builds and have the symbols info change dynamically with it. So
handy that I think it is useful for others as well.

Change-Id: Ib14c1161b4b0c9df797b9932ad14739e202cea64
Signed-off-by: Heiko Hund <>
M CMakeLists.txt
1 file changed, 6 insertions(+), 1 deletion(-)

  git pull ssh:// refs/changes/83/483/2

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d40b213..bc46c27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.12)
+cmake_minimum_required(VERSION 3.14)

@@ -42,6 +42,11 @@

 set(PLUGIN_DIR /usr/local/lib/openvpn/plugins CACHE FILEPATH "Location of the 
plugin directory")

+# Create machine readable compile commands
+file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
+                 ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json SYMBOLIC)
 # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to 
build with ASAN
     "-fsanitize=address,undefined -fno-sanitize-recover=all 
-fno-optimize-sibling-calls -fsanitize-address-use-after-scope 
-fno-omit-frame-pointer -g -O1"

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib14c1161b4b0c9df797b9932ad14739e202cea64
Gerrit-Change-Number: 483
Gerrit-PatchSet: 2
Gerrit-Owner: d12fk <>
Gerrit-Reviewer: flichtenheld <>
Gerrit-Reviewer: plaisthos <>
Gerrit-CC: openvpn-devel <>
Gerrit-Attention: plaisthos <>
Gerrit-Attention: flichtenheld <>
Gerrit-MessageType: newpatchset
Openvpn-devel mailing list

Reply via email to