diff options
author | Brad Smith <brad@comstyle.com> | 2022-09-02 22:30:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 22:30:09 +0300 |
commit | 5f45f793ae962a84c71a9b7ff434591c57cdad57 (patch) | |
tree | 41f3395bf4702ccd26625c7cbed3afa9664bf4e9 | |
parent | 529955e03dda72b66bf83e89a57565b03e55e14b (diff) |
Support building on OpenBSD (#4912)
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/print.cpp | 3 |
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"; } |