Support building on OpenBSD (#4912)

This commit is contained in:
Brad Smith 2022-09-02 15:30:09 -04:00 committed by GitHub
parent 529955e03d
commit 5f45f793ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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")

View File

@ -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"; }