From: "stipa (Code Review)" Date: Thu, 11 Jan 2024 13:32:05 +0000 References: Reply-To: lstipakov@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <155c753fa722f116571290a8b0d7ca056d4da4e7-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="GFE5pCMrL3k="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --GFE5pCMrL3k= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=3Demail to review the following change. Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json ...................................................................... CMakeLists.txt: Don't fail on missing compile_commands.json CMAKE_EXPORT_COMPILE_COMMANDS works only on Ninja and Makefile generators and doesn't produce anything on MSVC. Due to that, creating symlink for it fails for me. Fix by make symlink creation non-fatal by providing variable to store result. Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019 Signed-off-by: Lev Stipakov --- M CMakeLists.txt 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/95/495/1 diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..5c6fff0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ # Create machine readable compile commands set(CMAKE_EXPORT_COMPILE_COMMANDS 1) file(CREATE_LINK ${CMAKE_CURRENT_BINARY_DIR}/compile_commands.json - ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json SYMBOLI= C) + ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json RESULT = COMPILE_COMMANDS_CREATED SYMBOLIC) # AddressSanitize - use CXX=3Dclang++ CC=3Dclang cmake -DCMAKE_BUILD_TYPE= =3Dasan to build with ASAN set(CMAKE_C_FLAGS_ASAN -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019 Gerrit-Change-Number: 495 Gerrit-PatchSet: 1 Gerrit-Owner: stipa Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange --GFE5pCMrL3k= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

stipa would like plaisthos and flichtenheld to review t= his change.

Vi= ew Change

CMakeLists.txt: Don't fail on missing compile_commands.js=
on

CMAKE_EXPORT_COMPILE_COMMANDS works only on Ninja and Makefilegenerators and doesn't produce anything on MSVC.

Due to that, c= reating symlink for it fails for me.

Fix by make symlink creation no= n-fatal by providing variable
to store result.

Change-Id: Ic19f85= 9c3aca8b30aa51b12dcb906a6e7e735019
Signed-off-by: Lev Stipakov <lev@...220...= ..515...>
---
M CMakeLists.txt
1 file changed, 1 insertion(+), = 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn ref=
s/changes/95/495/1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc46c27..5c6fff0 100644
--- a/CMakeLists= .txt
+++ b/CMakeLists.txt
@@ -45,7 +45,7 @@=
# Create machine readable compile commands
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)

file(CREATE_LINK $= {CMAKE_CURRENT_BINARY_DIR}/compile_commands.json
- ${CMAKE_CURRENT_SOURCE_DIR}/com= pile_commands.json SYMBOLIC)
+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json= RESULT COMPILE_COMMANDS_CREATED SYMBOLIC)

# AddressSanitize - use CXX=3Dclang++ CC=3Dclang cmake -DCMAKE_BUILD_TYP= E=3Dasan to build with ASAN
set(CMAKE_C_FLAGS_ASAN<= br>

To view, visit change 495. To unsubscribe, or for h= elp writing mail filters, visit settings.

<= /div>
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb9= 06a6e7e735019
Gerrit-Change-Number: 495
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <lstipakov@...277...>= ;
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newchange
--GFE5pCMrL3k=--