Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2022-09-02 22:30:09 +0300
committerGitHub <noreply@github.com>2022-09-02 22:30:09 +0300
commit5f45f793ae962a84c71a9b7ff434591c57cdad57 (patch)
tree41f3395bf4702ccd26625c7cbed3afa9664bf4e9
parent529955e03dda72b66bf83e89a57565b03e55e14b (diff)
Support building on OpenBSD (#4912)
-rw-r--r--CMakeLists.txt2
-rw-r--r--source/print.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58694c34c..1b8fe92f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
set(SPIRV_TIMER_ENABLED ${SPIRV_ALLOW_TIMERS})
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
add_definitions(-DSPIRV_FREEBSD)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
+ add_definitions(-DSPIRV_OPENBSD)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
add_definitions(-DSPIRV_FUCHSIA)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "GNU")
diff --git a/source/print.cpp b/source/print.cpp
index 90dd5c17d..6c94e2b7f 100644
--- a/source/print.cpp
+++ b/source/print.cpp
@@ -16,7 +16,8 @@
#if defined(SPIRV_ANDROID) || defined(SPIRV_LINUX) || defined(SPIRV_MAC) || \
defined(SPIRV_IOS) || defined(SPIRV_TVOS) || defined(SPIRV_FREEBSD) || \
- defined(SPIRV_EMSCRIPTEN) || defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU)
+ defined(SPIRV_OPENBSD) || defined(SPIRV_EMSCRIPTEN) || \
+ defined(SPIRV_FUCHSIA) || defined(SPIRV_GNU)
namespace spvtools {
clr::reset::operator const char*() { return "\x1b[0m"; }