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
Adapt MSVC C++ mode handling to VS15.5 #3061
Conversation
cmake/HPX_DetectCppDialect.cmake
Outdated
@@ -116,6 +112,9 @@ macro(hpx_detect_cpp_dialect) | |||
hpx_info("C++ mode assumed: C++11") | |||
endif() | |||
|
|||
hpx_add_config_cond_define(_HAS_AUTO_PTR_ETC 1) | |||
hpx_add_config_cond_define(_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS) |
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.
Shouldn't this go in the HPX_WITH_CXX17
only?
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, we can do that.
cmake/HPX_DetectCppDialect.cmake
Outdated
@@ -89,24 +89,20 @@ macro(hpx_detect_cpp_dialect) | |||
|
|||
# enable enforcing a particular C++ mode | |||
if(HPX_WITH_CXX17) | |||
set(CXX_FLAG -std:c++latest) | |||
hpx_add_config_cond_define(_HAS_AUTO_PTR_ETC 1) | |||
set(CXX_FLAG -std:c++17) | |||
hpx_info("C++ mode enforced: C++17") | |||
elseif(HPX_WITH_CXX1Z) | |||
set(CXX_FLAG -std:c++latest) |
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.
C++1z essentially is C++17, right?
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.
Well, not quite - doesn't really change anything, however.
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.
my point is, when the next version of MSVC is released, -std:c++latest
might refer to C++2a, right?
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.
Who knows.
cmake/HPX_DetectCppDialect.cmake
Outdated
hpx_info("C++ mode enforced: C++17") | ||
hpx_add_config_cond_define(_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS) | ||
elseif(HPX_WITH_CXX1Z) | ||
set(CXX_FLAG -std:c++latest) |
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.
I am still unhappy with this. Isn't C++17 the latest and not 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.
LGTM now.
No description provided.