From 84597fa46a6c0134cef514f749c3f072bfe6fe14 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 24 Aug 2017 14:57:20 +0200 Subject: Fix the chain of issues regarding QSslConfiguration The failure was seen on Windows CI build, but was actually present on all platforms if the QSsl checks were properly fixed, or if certain CMake versions randomly decided to force C++11 usage. The first issue was that QSsl wrappers were not generated on all platforms because the C++11 standard was not forced for the compilation tests done in the check_qt_class macro. This is a bug in CMake, and the official way of fixing this is introduced in the yet unreleased CMake 3.9 version. The current fix is a workaround to explicitly pass the C++11 standard switch to the try_compile invocation. The next issue concerns handling of const char[] C++ types. There are three such members in QSslConfiguration, which caused build failures due to incorrectly generated code. The solution is to treat "const char[]" types as "const char*" types, which generates correct conversion code. Tests were also added to check for such cases. Change-Id: I874a3591dfc5f385338de7e3aff2a2c0dd2f5719 Reviewed-by: Christian Tismer Reviewed-by: Friedemann Kleint --- sources/pyside2/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sources/pyside2/CMakeLists.txt') diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt index d517d0ad7..1215e2598 100644 --- a/sources/pyside2/CMakeLists.txt +++ b/sources/pyside2/CMakeLists.txt @@ -104,6 +104,11 @@ if(CMAKE_HOST_APPLE) endif() endif() +# Force usage of the C++11 standard, without a silent fallback +# to C++98 if the compiler does not support C++11. +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + # Qt5: QT_INCLUDE_DIR does no longer exist. # On Windows, macOS, and Linux it can be computed from Qt5Core_INCLUDE_DIRS, which contains # a list of include directories. We take the first one. -- cgit v1.2.3