From: "cron2 (Code Review)" Date: Tue, 16 Jan 2024 13:23:21 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <26585db60e6d7c84d7e4a6312927a8fdc35b60b8-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="KuvxJZgipzE="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --KuvxJZgipzE= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/46= 9?usp=3Demail ) Change subject: Use mingw compile definition also to unit tests ...................................................................... Use mingw compile definition also to unit tests Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Message-Id: <20240116131831.31217-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28= 019.html Signed-off-by: Gert Doering --- M CMakeLists.txt 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () + if (MINGW) + target_compile_definitions(${target} PRIVATE + -DWIN32_LEAN_AND_MEAN + -DNTDDI_VERSION=3DNTDDI_VISTA -D_WIN32_WINNT=3D_WIN32_WINN= T_VISTA + ) + endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) - target_compile_options(openvpn PRIVATE - -DWIN32_LEAN_AND_MEAN - -DNTDDI_VERSION=3DNTDDI_VISTA -D_WIN32_WINNT=3D_WIN32_WINNT_VISTA - ) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif() -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?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: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 5 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --KuvxJZgipzE= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

Use mingw compile definition also to unit test=
s

Currently we only apply the defines for windows APIs and Unicode t= o
OpenVPN itself. We should rather treat the unit tests the same as
o= ur main binary to reduce potential differences.

Change-Id: Ie5aa643a= b6190262f7c8b9e614bedb398e85859b
Signed-off-by: Arne Schwabe <arne@...1186...= .1227...>
Acked-by: Frank Lichtenheld <frank@...2641...>
Mes= sage-Id: <20240116131831.31217-1-gert@...1296...>
URL: https://www= .mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28019.html
Sign= ed-off-by: Gert Doering <gert@...1296...>
---
M CMakeLists.txt<= br>1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc46c= 27..6f370c3 100644
--- a/CMakeLists.txt
+++= b/CMakeLists.txt
@@ -290,6 +290,13 @@

endif ()

+ if (MINGW)
+ target_compile_definitions(${target} PRIVATE
+ -DWIN= 32_LEAN_AND_MEAN
+ = -DNTDDI_VERSION=3DNTDDI_VISTA -D_WIN32_WINNT=3D_WIN32_WINNT_VI= STA
+ )=
+ endif()
+

# optional d= ependencies
target_link_libraries(${target} PUBLIC

$<TARGET_NAME_IF_EXISTS:PkgConfig::liblz4>
@@ -545,11 +552,7 @@

add_lib= rary_deps(openvpn)

-if (MINGW)
- target_compile_options(openvpn PRIVATE
- -DWIN32_LEAN_AND_MEAN
- -DNTDDI_VERSION=3DNTDDI_VISTA -D_W= IN32_WINNT=3D_WIN32_WINNT_VISTA
- )
+= if(MINGW)
target_compile_options(openvpn PRIVATE -muni= code -UUNICODE)
target_link_options(openvpn PRIVATE -m= unicode)
endif()

To vi= ew, visit change 469. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614b= edb398e85859b
Gerrit-Change-Number: 469
Gerrit-PatchSet: 5
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--KuvxJZgipzE=--