0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

client/CMakeLists.txt: don't use gcc-specific flags in Windows build

Commit 9ad98bae8f ("Add building ovpncli swig library to cmake build")
added GCC-specific compiler flags which are unknown on Windows.

Remove those flags from Windows build.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
This commit is contained in:
Lev Stipakov 2022-03-15 15:00:23 +02:00 committed by Frank Lichtenheld
parent b4152600c2
commit 70d0f23305

View File

@ -30,8 +30,10 @@ if (${PYTHONLIBS_FOUND} AND ${SWIG_FOUND})
set_target_properties(ovpnclilib PROPERTIES OUTPUT_NAME "_ovpncli")
set_target_properties(ovpnclilib PROPERTIES PREFIX "")
# Swig generates code with deprecated python declarations
set_source_files_properties(ovpncli_wrap.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-sometimes-uninitialized -Wno-class-memaccess -Wno-unknown-warning-option")
if (NOT WIN32)
# Swig generates code with deprecated python declarations
set_source_files_properties(ovpncli_wrap.cxx PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations -Wno-sometimes-uninitialized -Wno-class-memaccess -Wno-unknown-warning-option")
endif()
else ()
MESSAGE(INFO "Python libraries or swig not found, skipping ovpncli swig build")
endif ()