From 6f35a939a30e9b31dfbd6731a50f7023aa3132e6 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Thu, 22 Feb 2024 15:21:29 -0800 Subject: [PATCH] Switch to C++17 for SIP and Shiboken Signed-off-by: Christophe Bedard --- cmake/shiboken_helper.cmake | 1 + cmake/sip_configure.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/shiboken_helper.cmake b/cmake/shiboken_helper.cmake index b71d2be..14dae5e 100644 --- a/cmake/shiboken_helper.cmake +++ b/cmake/shiboken_helper.cmake @@ -70,6 +70,7 @@ macro(_shiboken_generator_command VAR GLOBAL TYPESYSTEM INCLUDE_PATH BUILD_DIR) set(${VAR} ${SHIBOKEN_BINARY} --generatorSet=shiboken --enable-pyside-extensions + -std=c++17 --include-paths=${INCLUDE_PATH_WITH_COLONS}${SHIBOKEN_HELPER_INCLUDE_DIRS_WITH_COLONS} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM}) diff --git a/cmake/sip_configure.py b/cmake/sip_configure.py index b35ab00..5210ee5 100644 --- a/cmake/sip_configure.py +++ b/cmake/sip_configure.py @@ -209,14 +209,14 @@ def split_paths(paths): # redirect location of generated library makefile._target = '"%s"' % os.path.join(output_dir, makefile._target) -# Force c++14 +# Force c++17 if sys.platform == 'win32': - makefile.extra_cxxflags.append('/std:c++14') + makefile.extra_cxxflags.append('/std:c++17') # The __cplusplus flag is not properly set on Windows for backwards # compatibilty. This flag sets it correctly makefile.CXXFLAGS.append('/Zc:__cplusplus') else: - makefile.extra_cxxflags.append('-std=c++14') + makefile.extra_cxxflags.append('-std=c++17') # Finalise the Makefile, preparing it to be saved to disk makefile.finalise()