-
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
Fix compilation of tests with /std:c++17
#2292
Conversation
…herwise doesn't seem to pick it up
fc0c2b8
to
0bdf8b9
Compare
Am I going crazy? The debug runs print |
6e7fbe9
to
4e7518c
Compare
Seriously!? https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
|
4e7518c
to
0adfaf1
Compare
The correct solution probably would be to use compile_features; when we make this 3.7+ only we should be able to change this properly. But yes, this is a general issue that always needs a workaround for these IDE's. |
Yes, I had thought of that as well. But depends on dropping old CMake support, then.
Good point. I'll check if there's more of these around! (Should I also check for Xcode, btw, or not?) |
If it doesn't work on Xcode, I'd likely know pretty quickly. ;) I can't think of any more of these that are likely to be a problem, but I wouldn't have remembered the one above (I had to fix in in CLI11 a long time ago). I know of some that probably don't affect us (like the |
Thanks! I found 2 more occurences of pybind11/tools/pybind11Tools.cmake Line 257 in 8b9eb96
Not sure what the last one does, but it's already MSVC-specific. Any idea what to do? Just ignore, since it's only about parallel builds? |
Maybe tag it with a TODO? Is there a reason that |
No clue. Never really touched the CMake internals before. I'll just apply the same fix anyway. If someone passes by that knows more about CMake, we can still change it? :-) |
… CMake generators
9993c46
to
8d7551f
Compare
Builds are still using |
8d7551f
to
e09a1fa
Compare
I know the title says |
Yes, good point. I was planning to see if supporting VS 2019 would still be possible, but this is also something to add! |
cb9ce09
to
23d6691
Compare
23d6691
to
f7f3847
Compare
/MP: Build with Multiple Processes According to my experiences in previous years, it may or may not improve compilation time. See also MS own Guideline. If compilation speed is not a key factor here, you can safely omit this option IMO. |
Yes, that I can look up. My question was just wondering out loud why it's in pybind11's CMake and why not in debug, etc. (Which I might be able to look up through some |
What's the status of this? Are we just going to mandate |
Yes, but I haven't gotten to cleaning up this PR and adding it to the docs. Feel free to take over, if you want? |
Seems it needs to be closed to get it passed correctly?
Closes #2089
So this first commit should fail, given #2089.