File tree 2 files changed +18
-2
lines changed
2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,22 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
24
24
include_directories (BEFORE SYSTEM ${DISPATCH_INCLUDES} )
25
25
dispatch_windows_lib_for_arch(${CMAKE_SYSTEM_PROCESSOR} DISPATCH_LIBDIR)
26
26
link_directories (${DISPATCH_LIBDIR} )
27
+
28
+ include (CheckCSourceCompiles)
29
+ check_c_source_compiles([=[
30
+ #include <Windows.h>
31
+ int main(int argc, char *argv[]) {
32
+ switch ((LOGICAL_PROCESSOR_RELATIONSHIP)0) {
33
+ case RelationProcessorDie:
34
+ case RelationNumaNodeEx:
35
+ return 0;
36
+ }
37
+ return 0;
38
+ }
39
+ ]=] DISPATCH_HAVE_EXTENDED_SLPI_20348)
40
+ if (DISPATCH_HAVE_EXTENDED_SLPI_20348)
41
+ add_compile_definitions (DISPATCH_HAVE_EXTENDED_SLPI_20348)
42
+ endif ()
27
43
endif ()
28
44
29
45
set (CMAKE_C_STANDARD 11)
Original file line number Diff line number Diff line change @@ -156,12 +156,12 @@ _dispatch_hw_get_config(_dispatch_hw_config_t c)
156
156
++ dwProcessorPhysicalCount ;
157
157
dwProcessorLogicalCount += __popcnt64 (slpiCurrent -> ProcessorMask );
158
158
break ;
159
- #if defined(RelationProcessorDie )
159
+ #if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348 )
160
160
case RelationProcessorDie :
161
161
#endif
162
162
case RelationProcessorPackage :
163
163
case RelationNumaNode :
164
- #if defined(RelationNumaNodeEx )
164
+ #if defined(DISPATCH_HAVE_EXTENDED_SLPI_20348 )
165
165
case RelationNumaNodeEx :
166
166
#endif
167
167
case RelationCache :
You can’t perform that action at this time.
0 commit comments