We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e4f8e4 commit a00a5dcCopy full SHA for a00a5dc
1 file changed
test/vcpkg-consumer/CMakeLists.txt
@@ -16,4 +16,13 @@ if(TARGET snmalloc::snmallocshim-static)
16
add_executable(test-static-shim test_static_shim.cpp)
17
target_link_libraries(test-static-shim PRIVATE snmalloc::snmallocshim-static)
18
add_test(NAME static-shim COMMAND test-static-shim)
19
+
20
+if (WIN32)
21
+ set(WIN8COMPAT FALSE CACHE BOOL "Avoid Windows 10 APIs")
22
+ target_compile_definitions(test-static-shim INTERFACE $<$<BOOL:${WIN8COMPAT}>:WINVER=0x0603>)
23
+ # VirtualAlloc2 is exposed by mincore.lib, not Kernel32.lib (as the
24
+ # documentation says)
25
+ target_link_libraries(test-static-shim INTERFACE $<$<NOT:$<BOOL:${WIN8COMPAT}>>:mincore>)
26
+ message(STATUS "test-static-shim: Avoiding Windows 10 APIs is ${WIN8COMPAT}")
27
+ endif()
28
endif()
0 commit comments