From: "cron2 (Code Review)" Date: Wed, 7 May 2025 12:35:19 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <7050be758d77d7e6adc09690716bb94f584cdabc-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="FBc5sPI6YSc="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: CMake: Make sure to treat UNIT_TEST_SOURCEDIR as path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld , plaisthos Cc: openvpn-devel --FBc5sPI6YSc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/981?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by plaisthos Change subject: CMake: Make sure to treat UNIT_TEST_SOURCEDIR as path ...................................................................... CMake: Make sure to treat UNIT_TEST_SOURCEDIR as path This makes sure that it is properly normalized, and on Windows seems to prevent CMake from using back slashes which would break the build due to "unknown escape sequence" errors. Change-Id: I2551edfaaf5107649398a3fa1db2009ee8644671 Signed-off-by: Frank Lichtenheld Acked-by: Arne Schwabe Message-Id: <20250507121226.13824-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31= 587.html Signed-off-by: Gert Doering --- M CMakeLists.txt 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/81/981/2 diff --git a/CMakeLists.txt b/CMakeLists.txt index a8fb64b..6687b56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -679,11 +679,11 @@ endif () foreach (test_name ${unit_tests}) + cmake_path(SET _UT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/un= it_tests/openvpn) # test_networking needs special environment if (NOT ${test_name} STREQUAL "test_networking") add_test(${test_name} ${test_name}) # for compat with autotools make check - set(_UT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit_test= s/openvpn) set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "srcdir=3D${_UT_SOURCE_DIR}") endif () @@ -703,7 +703,7 @@ # for compat with IDEs like Clion that ignore the tests properties # for the environment variable srcdir when running tests as fallba= ck - target_compile_definitions(${test_name} PRIVATE "-DUNIT_TEST_SOURC= EDIR=3D\"${CMAKE_SOURCE_DIR}/tests/unit_tests/openvpn\"") + target_compile_definitions(${test_name} PRIVATE "UNIT_TEST_SOURCED= IR=3D\"${_UT_SOURCE_DIR}\"") if (NOT ${test_name} STREQUAL "test_buffer") target_sources(${test_name} PRIVATE -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/981?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: I2551edfaaf5107649398a3fa1db2009ee8644671 Gerrit-Change-Number: 981 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --FBc5sPI6YSc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outda= ted and were removed: Code-Review+2 by plaisthos

CMake: Make sure to treat UNIT_TEST_SOURCEDIR as=
 path

This makes sure that it is properly normalized, and
on Wind= ows seems to prevent CMake from using back
slashes which would break the= build due to "unknown escape
sequence" errors.

Change-= Id: I2551edfaaf5107649398a3fa1db2009ee8644671
Signed-off-by: Frank Licht= enheld <frank@...2641...>
Acked-by: Arne Schwabe <arne-openvpn@= ...1227...>
Message-Id: <20250507121226.13824-1-gert@...1296...>= ;
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/= msg31587.html
Signed-off-by: Gert Doering <gert@...1296...>
---=
M CMakeLists.txt
1 file changed, 2 insertions(+), 2 deletions(-)
=
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/81/981/=
2
diff --git a/CMakeLists.txt b/CMakeLists.txt
inde= x a8fb64b..6687b56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -679,11 +679,11 @@
endif ()

foreach (test_name= ${unit_tests})
+ = cmake_path(SET _UT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit_te= sts/openvpn)
# test_networking needs special envir= onment
if (NOT ${test_name} STREQUAL "test_ne= tworking")
add_test(${test_name} ${test_n= ame})
# for compat with autotools make check
- set(_UT_SOU= RCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests/unit_tests/openvpn)
set_tests_properties(${test_name} PROPERTIES

ENVIRONMENT "srcdir=3D${_UT_SOURCE_DIR}")
endif ()
@@ -703,7 +703,7 @@
# for compat with IDEs like Clion that ig= nore the tests properties
# for the environment va= riable srcdir when running tests as fallback
- target_compile_definitions(${test_name} PRIV= ATE "-DUNIT_TEST_SOURCEDIR=3D\"${CMAKE_SOURCE_DIR}/tests/unit_tes= ts/openvpn\"")
+ target_compile_definitions(${test_name} PRIVATE "UNIT_TES= T_SOURCEDIR=3D\"${_UT_SOURCE_DIR}\"")

if (NOT ${test_name} STREQUAL "test_buffer")=
target_sources(${test_name} PRIVATE

To view, visit change 981. To unsubscribe, or for hel= p writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2551edfaaf5107649398a3fa1db= 2009ee8644671
Gerrit-Change-Number: 981
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--FBc5sPI6YSc=--