message: Automatically discover iOS SDK on macOS
diff: @@ -69,11 +69,26 @@ if (ISPC_CROSS)
  message (FATAL_ERROR "Set ISPC_MACOS_SDK_PATH variable for cross compilation to MacOS e.g. C:/iusers/MacOSX10.14.sdk")
  endif()
  elseif (APPLE)
  + # Use standard macOS SDK location if this is not specified.
  + if (NOT ISPC_MACOS_SDK_PATH)
  + set(command "xcrun" "--show-sdk-path")
  + execute_process(COMMAND ${command}
  + OUTPUT_VARIABLE ISPC_MACOS_SDK_PATH
  + OUTPUT_STRIP_TRAILING_WHITESPACE
  + )
  + message(STATUS "Using macOS SDK path ${ISPC_MACOS_SDK_PATH}")
  + endif()
  if ((ISPC_LINUX_TARGET OR ISPC_ANDROID_TARGET) AND NOT ISPC_ANDROID_NDK_PATH)
  message (FATAL_ERROR "Set ISPC_ANDROID_NDK_PATH variable for cross compilation to Linux/Android e.g. /Users/Shared/android-ndk-r20")
  - elseif (ISPC_IOS_TARGET AND NOT ISPC_IOS_SDK_PATH)
  - message (FATAL_ERROR "Set ISPC_IOS_SDK_PATH variable for cross compilation to IOS "
  - "e.g. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk")
  + endif()
  + if (ISPC_IOS_TARGET AND NOT ISPC_IOS_SDK_PATH)
  + # Use standard iOS SDK location if this is not specified.
  + set(command "xcrun" "--show-sdk-path" "--sdk" "iphoneos")
  + execute_process(COMMAND ${command}
  + OUTPUT_VARIABLE ISPC_IOS_SDK_PATH
  + OUTPUT_STRIP_TRAILING_WHITESPACE
  + )
  + message(STATUS "Using iOS SDK path ${ISPC_IOS_SDK_PATH}")
  endif()
  else()
  if (ISPC_MACOS_TARGET AND NOT ISPC_MACOS_SDK_PATH)
  @@ -92,15 +107,6 @@ else()
  endif()
  endif()
  -if (APPLE AND NOT ISPC_MACOS_SDK_PATH)
  - set(command "xcrun" "--show-sdk-path")
  - execute_process(COMMAND ${command}
  - OUTPUT_VARIABLE ISPC_MACOS_SDK_PATH
  - OUTPUT_STRIP_TRAILING_WHITESPACE
  - )
  - message(STATUS "Using macOS SDK path ${ISPC_MACOS_SDK_PATH}")
  -endif()
  -
  if (UNIX)
  option(ISPC_STATIC_STDCXX_LINK "Link statically with libstdc++ and libgcc" OFF)
  if (ISPC_PREPARE_PACKAGE AND (NOT APPLE))
  