-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
glog 0.5.0: Compilation fails with Visual Studio and CMake #668
Comments
How can this be reproduced? Our VS2019 CI setup does find
Also:
This is incorrect. Glog does not specify any standard and uses whatever standard the compiler defaults to. There's also no "glog 5.0". Do you mean 0.5.0? |
Yes 0.5.0, it's a typo. And correct, by default glog is compiled with default standard of the compiler. It fails in github action with windows-2016 and windows-2019 agents: https://github.com/SpaceIm/conan-glog/actions/runs/926106668 |
We do not use conan for CI builds. Hence, I do not see how are they relevant. Please provide the exact CMake and/or compiler flags that allow to reproduce the problem. |
I can't test locally right now, but after some modifications in conan recipe to remove conan specific stuff which can be hard to emulate, I end up with this kind of configuration command:
|
These are mostly default values and I don't see how can they affect the detection of Could you please attach |
Feel free to reopen once you have more info. |
Here is CMakeError.log: Click to expand log
|
I see, it should be |
Yes. Evidently, the error emerges only when glog is used in combination with conan. The latter enables the use of a C compiler which standalone glog does not request. |
Well, it's not conan itself, but the CMakeLists wrapper of this conan recipe. I guess that glog compilation could also fail if added with |
Sure. I would consider including third-party project via |
cmake: fixed msvc snprintf detection (fixes #668)
As you can see,
snprintf
is not found incstdio
by CMake test (it's officially not part of C++98 standard, and glog is compiled with C++98 standard by default):glog/CMakeLists.txt
Line 144 in c1499f6
But when
port.cc
is compiled, definition ofsnprintf
is found instdio.h
.Reverting this test to include stdio.h instead of cstdio fixes this issue.
The text was updated successfully, but these errors were encountered: