Skip to content

Commit

Permalink
Switch to C++17 for SIP and Shiboken (#135)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
  • Loading branch information
christophebedard committed Feb 23, 2024
1 parent 5408ecf commit ef7b38b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmake/shiboken_helper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
6 changes: 3 additions & 3 deletions cmake/sip_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ef7b38b

Please sign in to comment.