-
Notifications
You must be signed in to change notification settings - Fork 34
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
Don't downgrade the C++ version #103
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported.
Thank you for sending this upstream. This is really nicely done. |
musicinmybrain
added a commit
to musicinmybrain/gfal2
that referenced
this pull request
Jan 25, 2023
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The content of this commit and the preceding portion of the commit message were originally written by Mattias Ellert, @ellert, for cern-fts/davix in cern-fts/davix#103.
musicinmybrain
added a commit
to musicinmybrain/gfal2
that referenced
this pull request
Jan 25, 2023
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The content of this commit and the preceding portion of the commit message were originally written by Mattias Ellert, @ellert, for cern-fts/davix in cern-fts/davix#103.
musicinmybrain
added a commit
to musicinmybrain/gfal2
that referenced
this pull request
Jan 25, 2023
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The content of this commit and the preceding portion of the commit message were originally written by Mattias Ellert, @ellert, for cern-fts/davix in cern-fts/davix#103.
musicinmybrain
added a commit
to musicinmybrain/gfal2
that referenced
this pull request
Jan 25, 2023
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The implementation and the preceding commit message text are by Mattias Ellert, @ellert, copied from cern-fts/davix#103.
Hello, Thanks for the great fix! Merged into Cheers, |
mpatrascoiu
pushed a commit
to cern-fts/gfal2
that referenced
this pull request
Feb 2, 2023
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version. Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting. The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13. C++ 17 is the default since GCC 11. C++ 14 is the default since GCC 6.1. This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors: /usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported. The implementation and the preceding commit message text are by Mattias Ellert, @ellert, copied from cern-fts/davix#103.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cmake configuration adds a compiler flag to set the C++ version to C++11. This happens even if the default C++ version for the GCC compiler version used is higer than C++11. In this case the flag downgrades the version.
Since system libraries and headers can use features compatible with the default C++ version of the default compiler, downgrading the C++ version might make some system libraries incompatible with this setting.
The recent update of googletest in Fedora requires C++ 14. The gcc version in Fedora Rawhide is currently 13.
C++ 17 is the default since GCC 11.
C++ 14 is the default since GCC 6.1.
This PR drops the addition of the -std=c++11 flag if the GCC version is 6.1 or greater. With this change the code can be compiled on Fedora Rawhide without triggering errors:
/usr/include/gtest/internal/gtest-port.h:270:2: error: #error C++ versions less than C++14 are not supported.