-
Notifications
You must be signed in to change notification settings - Fork 707
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
Require C++14, massive CMake cleanup #10307
Conversation
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.
This looks very good to me and has my support. I like the idea of pushing the selection of the standard to the user. Yet, it might be surprising for some users that we are now not aggressively looking for the newest standard available, so I think it might be worth documenting it on the cmake documentation web page as remarked below.
95cbd38
to
887e041
Compare
Hmm...I can configure with both MSVC 2017 and 2019. |
@masterleinad The last version seems to work - I simply setting |
Still works for me. |
Let me know if I can test anything. |
What a very interesting MSVC failure:
|
There must be something off with how we now handle |
FWIW the current state of this is fine on GCC 5.4.0. |
b3fd36d
to
9394c3a
Compare
This now compiles on Windows. |
We had another DEAL_II_CONSTEXPR_BUG check in our CMake configuration. Let's just use DEAL_II_CXX14_CONSTEXPR_BUG instead.
@drwells This is now rebased (no change except tracing changes to |
|
||
_cuda_ensure_feature_off(9 17 14) | ||
_cuda_ensure_feature_off(10 17 14) |
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.
👍
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.
:-)
4 approvals, ready to merge tag and all tests passed :-) I think I will be bold and merge my own pull request. |
Let's see if hell breaks loose now. 😉 |
Closes #10296
This pull request ended up quite a bit more massive than I anticipated. Let me explain:
I think the configuration logic that I introduced with
DEAL_II_WITH_CXX11
,DEAL_II_WITH_CXX14
, andDEAL_II_WITH_CXX17
mutated into an unmaintainable mess. The main issue is the fact that support for a language standard is controlled by the compiler flag-std=c++XY
. Consequently the CMake configuration had to honor this while at the same time allowing to set the standard viaDEAL_II_WITH_CXXxy
. Now the problem is there are two ways of specifying the same thing and one has to start to get really smart about guessing what actually should be happen... (for the curious: We ended up implementing some very weird quinary logic thing...) To make it short I simply removed the whole damn thing. The behavior is now as follows:DEAL_II_HAVE_CXX17
that can be used deal.II internally for our wrapper include files, etc.I think this is a much saner approach than the mess we had.
I will add one automagic configuration feature back, though: If we detect a very old compiler we will simply set
-std=c++14
as a compiler flag unconditionally. This is safe insofar that they actually only support C++14 at maximum...