-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Natron's minimum C++ version to c++17. #984
Conversation
Signed-off-by: Aaron Colwell <300262+acolwell@users.noreply.github.com>
@@ -32,7 +32,7 @@ set(PYENGINE_HEADER PySide2_Engine_Python.h) | |||
set(POST_SHIBOKEN ../tools/utils/runPostShiboken2.sh) | |||
|
|||
set(shiboken_args | |||
"--enable-parent-ctor-heuristic" "--use-isnull-as-nb_nonzero" | |||
"-std=c++17" "--enable-parent-ctor-heuristic" "--use-isnull-as-nb_nonzero" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it really "-std" with a single hyphen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If you run "shiboken2 --help" you'll see that I can either use -std= or --language-level=. The mix of single and double '-' named options is a little weird, but my guess is that this is just so it matches g++ and clang's option.
global.pri
Outdated
@@ -309,10 +306,10 @@ macx-clang-libc++ { | |||
QMAKE_OBJECTIVE_CFLAGS += -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET | |||
QMAKE_OBJECTIVE_CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$$QMAKE_MACOSX_DEPLOYMENT_TARGET | |||
c++11 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since c++17 is meant to be a requirement, shouldn't we just skip all these conditions and just burn in the c++17 stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor cleanups could be added, but it's ok to merge it as is
tools/jenkins/compiler-common.sh
Outdated
OBJECTIVE_CC=$CC | ||
OBJECTIVE_CXX=$CXX | ||
;; | ||
esac | ||
elif [ "$COMPILER" = "clang-omp" ]; then | ||
# newer version (testing) using clang-4.0 | ||
CC=clang-mp-4.0 | ||
CXX="clang++-mp-4.0 -stdlib=libc++ -std=c++14" | ||
CXX17="clang++-mp-4.0 -stdlib=libc++ -std=c++1z" | ||
CXX="clang++-mp-4.0 -stdlib=libc++ -std=c++1z" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang 4 doesn't support c++17, so just remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. done. Given this statement, I've also changed the 3.4 reference above on line 49 to 5.0. I don't know if that path is ever used anymore, but changing that seems consistent with your comment here.
It might be nice to clean up the number of compilers and paths we have here to match the minimal Mac environment we want to support going forward. I don't really know anything about Mac so I'm not really a good person to clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match the minimal Mac environment we want to support going forward
RB-2.6 should work with macOS 10.13+ (lowest supported by the Qt version we use).
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:
PR Description
What type of PR is this? (Check one of the boxes below)
What does this pull request do?
Updates to C++17 as the minimum C++version. Libraries like OpenImageIO are heading towards this as their minimum version and it is the minimum version for the VFX Reference Platform.
Have you tested your changes (if applicable)? If so, how?
Yes. Installer still builds and passes all tests.