-
Notifications
You must be signed in to change notification settings - Fork 438
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
[BUILD] Visual Studio GMOCK_LIB issues and explicit c++17 #3158
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
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.
Thanks for the patch.
This needs more investigations, to understand the root cause.
|
||
# Force C++17 | ||
if(MSVC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") |
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.
We can not have that, this will break everybody.
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'll try to find an alternative
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.
@marcalff The only other way I can get it to compile with vs2022 is to add "-DWITH_STL=CXX14"
Other wise i get
warning STL4038: The contents of <string_view> are available only with C++17 or later.
C:\Users\Administrator\Git\opentelemetry-cpp\api\include\opentelemetry/std/string_view.h(18): error C2039: 'string_view': is not a member of 'std'
This is during stl
build, nostd
works without this (of course).
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.
You can use -DCMAKE_CXX_STANDARD=17
when running cmake command to use C++17 in your environment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3158 +/- ##
=======================================
Coverage 87.86% 87.86%
=======================================
Files 195 195
Lines 6151 6151
=======================================
Hits 5404 5404
Misses 747 747
|
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes