File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,6 @@ find_package(LibXml2 REQUIRED)
34
34
include (SwiftSupport )
35
35
include (GNUInstallDirs )
36
36
37
- if (CMAKE_SYSTEM_NAME STREQUAL Linux )
38
- include (CheckSymbolExists )
39
- include (CheckIncludeFile )
40
- list (APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
41
- check_include_file ("sched.h" HAVE_SCHED_H )
42
- check_symbol_exists (sched_getaffinity "sched.h" HAVE_SCHED_GETAFFINITY )
43
- endif ()
44
-
45
37
string (TOLOWER ${CMAKE_SYSTEM_NAME} swift_os )
46
38
get_swift_host_arch (swift_arch )
47
39
Original file line number Diff line number Diff line change @@ -368,6 +368,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux OR CMAKE_SYSTEM_NAME STREQUAL Android)
368
368
target_compile_definitions (CFXMLInterface
369
369
PRIVATE
370
370
-D_GNU_SOURCE )
371
+
372
+ if (CMAKE_SYSTEM_NAME STREQUAL Linux )
373
+ include (CheckSymbolExists )
374
+ include (CheckIncludeFile )
375
+ list (APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE )
376
+ check_include_file ("sched.h" HAVE_SCHED_H )
377
+ if (HAVE_SCHED_H )
378
+ check_symbol_exists (sched_getaffinity "sched.h" HAVE_SCHED_GETAFFINITY )
379
+ endif ()
380
+ endif ()
381
+
371
382
if (HAVE_SCHED_GETAFFINITY )
372
383
target_compile_definitions (CoreFoundation
373
384
PRIVATE
You can’t perform that action at this time.
0 commit comments