Add iOS as a supported platform (#3001)
* Add iOS as a supported platform
Treating it the same as Darwin. Fixes #2994.
* Add iOS specific macro.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c35a02f..19108f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,8 @@
add_definitions(-DSPIRV_WINDOWS)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
add_definitions(-DSPIRV_MAC)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS")
+ add_definitions(-DSPIRV_IOS)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
add_definitions(-DSPIRV_ANDROID)
set(SPIRV_TIMER_ENABLED ${SPIRV_ALLOW_TIMERS})
diff --git a/source/print.cpp b/source/print.cpp
index 24ef519..1d9829d 100644
--- a/source/print.cpp
+++ b/source/print.cpp
@@ -15,7 +15,7 @@
#include "source/print.h"
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \
- defined(SPIRV_FREEBSD) || defined(SPIRV_EMSCRIPTEN)
+ defined(SPIRV_IOS) || defined(SPIRV_FREEBSD) || defined(SPIRV_EMSCRIPTEN)
namespace spvtools {
clr::reset::operator const char*() { return "\x1b[0m"; }