[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-17 Thread stipa (Code Review)
stipa has abandoned this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/495?usp=email )

Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..


Abandoned

Original patch has been reworked and this workaround is not needed.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019
Gerrit-Change-Number: 495
Gerrit-PatchSet: 3
Gerrit-Owner: stipa 
Gerrit-Reviewer: flichtenheld 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-MessageType: abandon
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-12 Thread stipa (Code Review)
Attention is currently required from: flichtenheld, plaisthos, stipa.

Hello flichtenheld, plaisthos,

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

http://gerrit.openvpn.net/c/openvpn/+/495?usp=email

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

The following approvals got outdated and were removed:
Code-Review-1 by flichtenheld


Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..

CMakeLists.txt: Don't fail on missing compile_commands.json

Creating symlinks on Windows by default requires an elevated prompt,
which is not normally the case (but it turned out is the case for GHA).
Without elevated prompt this fails the build. Fix by make symlink creation
non-fatal by providing variable to store result.

Since CMAKE_EXPORT_COMPILE_COMMANDS works only on Ninja and
Makefile generators and doesn't produce anything on MSVC,
the symlink is useless in this case anyway.

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/3

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 SYMBOLIC)
+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json RESULT 
COMPILE_COMMANDS_CREATED SYMBOLIC)

 # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to 
build with ASAN
 set(CMAKE_C_FLAGS_ASAN

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019
Gerrit-Change-Number: 495
Gerrit-PatchSet: 3
Gerrit-Owner: stipa 
Gerrit-Reviewer: flichtenheld 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-Attention: plaisthos 
Gerrit-Attention: flichtenheld 
Gerrit-Attention: stipa 
Gerrit-MessageType: newpatchset
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-12 Thread flichtenheld (Code Review)
Attention is currently required from: plaisthos, stipa.

flichtenheld has posted comments on this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/495?usp=email )

Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..


Patch Set 2: Code-Review-1

(2 comments)

Commit Message:

http://gerrit.openvpn.net/c/openvpn/+/495/comment/ff72c046_d852df10 :
PS2, Line 7: CMakeLists.txt: Don't fail on missing compile_commands.json
Change to CMake: Don't fail if compile_commands.json symlink can't be created.


http://gerrit.openvpn.net/c/openvpn/+/495/comment/78f9bf15_9a748563 :
PS2, Line 15: There a two issues:
I would suggest replacing this whole section with:

<--->
Creating symlinks on Windows by default requires an elevated prompt,
which is not normally the case (but it turned out is the case for GHA).
Without elevated prompt this fails the build.
Fix by make symlink creation non-fatal by providing variable
to store result.

Since CMAKE_EXPORT_COMPILE_COMMANDS works only on Ninja and Makefile generators 
and doesn't produce anything on MSVC,
the symlink is useless in this case anyway.
<>

This makes it clearer what the actual issue is, but mentions
the other issue as justification.



--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019
Gerrit-Change-Number: 495
Gerrit-PatchSet: 2
Gerrit-Owner: stipa 
Gerrit-Reviewer: flichtenheld 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-Attention: plaisthos 
Gerrit-Attention: stipa 
Gerrit-Comment-Date: Fri, 12 Jan 2024 14:13:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-12 Thread stipa (Code Review)
Attention is currently required from: flichtenheld, plaisthos.

Hello flichtenheld, plaisthos,

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

http://gerrit.openvpn.net/c/openvpn/+/495?usp=email

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

The following approvals got outdated and were removed:
Code-Review-1 by flichtenheld


Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..

CMakeLists.txt: Don't fail on missing compile_commands.json

Commit

855030f3 ("cmake: create and link compile_commands.json file")

added creation of compile commands file and a symbolic link to it.

There a two issues:

 - CMAKE_EXPORT_COMPILE_COMMANDS works only on Ninja and Makefile
generators and doesn't produce anything on MSVC.

 - creating symlink on Windows by default requires an elevated prompt,
which is not normally the case (but it turned out is the case for GHA).
Without elevated prompt this fails the build.

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/2

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 SYMBOLIC)
+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json RESULT 
COMPILE_COMMANDS_CREATED SYMBOLIC)

 # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to 
build with ASAN
 set(CMAKE_C_FLAGS_ASAN

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ic19f859c3aca8b30aa51b12dcb906a6e7e735019
Gerrit-Change-Number: 495
Gerrit-PatchSet: 2
Gerrit-Owner: stipa 
Gerrit-Reviewer: flichtenheld 
Gerrit-Reviewer: plaisthos 
Gerrit-CC: openvpn-devel 
Gerrit-Attention: plaisthos 
Gerrit-Attention: flichtenheld 
Gerrit-MessageType: newpatchset
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-12 Thread stipa (Code Review)
Attention is currently required from: flichtenheld, plaisthos.

stipa has posted comments on this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/495?usp=email )

Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
> As discussed on IRC: I really would like to understand and document WHY this 
> patch is needed. […]
I got the same error when running CMake from CMD:

https://gist.githubusercontent.com/lstipakov/3c87a0d4c5eeb0ce7c91645171814221/raw/e25fe78607eeb6e0fda4225271e7c248f51e6e81/gistfile1.txt

(the error messages translates to "user doesn't have required permissions")



--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.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-Comment-Date: Fri, 12 Jan 2024 11:04:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: flichtenheld 
Gerrit-MessageType: comment
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-12 Thread flichtenheld (Code Review)
Attention is currently required from: plaisthos, stipa.

flichtenheld has posted comments on this change. ( 
http://gerrit.openvpn.net/c/openvpn/+/495?usp=email )

Change subject: CMakeLists.txt: Don't fail on missing compile_commands.json
..


Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1: 
As discussed on IRC: I really would like to understand and document WHY this 
patch is needed. When calling CMake directly (e.g. in GHA), the broken symlink 
is created without complaint.



--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.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: stipa 
Gerrit-Comment-Date: Fri, 12 Jan 2024 10:28:02 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel


[Openvpn-devel] [XS] Change in openvpn[master]: CMakeLists.txt: Don't fail on missing compile_commands.json

2024-01-11 Thread stipa (Code Review)
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=email

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 SYMBOLIC)
+ ${CMAKE_CURRENT_SOURCE_DIR}/compile_commands.json RESULT 
COMPILE_COMMANDS_CREATED SYMBOLIC)

 # AddressSanitize - use CXX=clang++ CC=clang cmake -DCMAKE_BUILD_TYPE=asan to 
build with ASAN
 set(CMAKE_C_FLAGS_ASAN

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/495?usp=email
To unsubscribe, or for help writing mail filters, visit 
http://gerrit.openvpn.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
___
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel