cmake: improve detection of threadsafe feature#9312
cmake: improve detection of threadsafe feature#9312mback2k wants to merge 1 commit intocurl:masterfrom
Conversation
31beaaa to
e17de80
Compare
45204c0 to
a1f8843
Compare
|
@MarcelRaad with the current state of this PR I almost get all AppVeyor builds to work again regarding test 1014, but one is still failing and quite weird. My new CMake |
|
Hmm, I don't see it on first glance either. This is Visual Studio 2010 with the Windows 7 SDK, which defaults to 0x0601, so that should be correct. I'll take another look later. |
e6737f4 to
c940724
Compare
|
@MarcelRaad I was missing the include of |
|
But you had the include of windows.h, which should include sdkddkver.h itself, shouldn't it? And even if it didn't, nothing should define Still/again looks good to me. Only are the includes of curl_setup.h and sdkddkver.h both needed? I thought that curl_setup.h was needed because the include of windows.h, and ultimately sdkddkver.h, was expected to happen through that (in setup-win32.h). |
|
|
|
Strange. I checked several Windows SDK versions I have installed and one of the first things all of them do is unconditionally include <sdkddkver.h>, typically right after including <winapifamily.h> for recent versions. 😕 |
I found the source of that definition: Lines 393 to 453 in 3f98eaa So, if Now I am wondering why this behavior is not always affecting us since |
|
Wow. config-win32.h is for non-CMake builds, but Edit: so what happens is:
|
|
Maybe we should include setup-win32.h directly then to avoid pulling in config-win32.h? Then we should have the same behavior as libcurl itself in regards to Windows SDK includes and definitions and don't need any additional includes. |
|
Ok, so include |
|
yes 👍 |
|
AppVeyor looks good now, thanks @MarcelRaad. Unfortunately I had to include some boilerplate in the test before including setup-win32.h to avoid compiler warnings and errors. Also I am not sure regarding the relevance of the other CI failures yet. |
|
Ah, right, that stuff is still in curl_setup.h for the winapifamily.h include. I actually wanted to move that whole block to setup-win32.h, but that's not possible because of a circular dependency: config-win32.h needs the definition of But I think we could move the definition of |
The macOS HTTP2 test failures show up in other PRs too. |
Okay, but let us save that for after fixing AppVeyor for now to see if that would break other things. Then the test can be updated accordingly. |
e961210 to
64c3770
Compare
64c3770 to
0f90606
Compare
Suggested-by: Marcel Raad Follow up to curl#9312
Avoids failing test 1014 by replicating configure checks
for HAVE_ATOMIC and _WIN32_WINNT with custom CMake tests.
Follow up to #8680 and #8997