Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

acolwell
Copy link
Collaborator

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)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
    • I have updated the documentation accordingly

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.

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"
Copy link
Member

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?

Copy link
Collaborator Author

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 {
Copy link
Member

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Done.

Copy link
Member

@devernay devernay left a 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

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"
Copy link
Member

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

Copy link
Collaborator Author

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.

Copy link
Contributor

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).

@acolwell acolwell merged commit b38d9d5 into NatronGitHub:RB-2.6 Jul 22, 2024
3 checks passed
@acolwell acolwell deleted the upgrade_to_c++17 branch July 22, 2024 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants