|
Lines 101-123
Link Here
|
| 101 |
endif() |
101 |
endif() |
| 102 |
|
102 |
|
| 103 |
if(APPLE) |
103 |
if(APPLE) |
| 104 |
# On Darwin if /usr/include/c++ doesn't exist, the user probably has Xcode but |
104 |
# Do not add -isysroot flag on Gentoo Prefix (search paths handled by cmake) |
| 105 |
# not the command line tools (or is using macOS 10.14 or newer). If this is |
105 |
set(OSX_SYSROOT_FLAG "") |
| 106 |
# the case, we need to find the OS X sysroot to pass to clang. |
|
|
| 107 |
if(NOT EXISTS /usr/include/c++) |
| 108 |
execute_process(COMMAND xcrun -sdk macosx --show-sdk-path |
| 109 |
OUTPUT_VARIABLE OSX_SYSROOT |
| 110 |
ERROR_QUIET |
| 111 |
OUTPUT_STRIP_TRAILING_WHITESPACE) |
| 112 |
if (NOT OSX_SYSROOT OR NOT EXISTS ${OSX_SYSROOT}) |
| 113 |
message(WARNING "Detected OSX_SYSROOT ${OSX_SYSROOT} does not exist") |
| 114 |
else() |
| 115 |
message(STATUS "Found OSX_SYSROOT: ${OSX_SYSROOT}") |
| 116 |
set(OSX_SYSROOT_FLAG "-isysroot${OSX_SYSROOT}") |
| 117 |
endif() |
| 118 |
else() |
| 119 |
set(OSX_SYSROOT_FLAG "") |
| 120 |
endif() |
| 121 |
|
106 |
|
| 122 |
option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On) |
107 |
option(COMPILER_RT_ENABLE_IOS "Enable building for iOS" On) |
| 123 |
option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off) |
108 |
option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off) |