File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,13 @@ if(TARGET snmalloc::snmallocshim-static)
1616 add_executable (test -static-shim test_static_shim.cpp )
1717 target_link_libraries (test -static-shim PRIVATE snmalloc::snmallocshim-static )
1818 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 ()
1928endif ()
You can’t perform that action at this time.
0 commit comments