Skip to content

Commit 6571c14

Browse files
committed
Revert "Simplify CMake hwy option"
This reverts commit 4d3b1f3.
1 parent 4d3b1f3 commit 6571c14

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.claude/settings.local.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,18 @@ endif ()
113113
option (${PROJ_NAME}_BUILD_TOOLS "Build the command-line tools" ON)
114114
option (${PROJ_NAME}_BUILD_TESTS "Build the unit tests" ON)
115115

116-
# Google Highway SIMD acceleration for selected ImageBufAlgo ops. (optimization)
117-
option (OIIO_USE_HWY "Enable experimental Google Highway SIMD optimizations (if Highway is available)" OFF)
116+
# Google Highway SIMD acceleration for selected ImageBufAlgo ops. This is an
117+
# optional optimization dependency: if enabled but not found, it will be
118+
# compiled out.
119+
#
120+
# Back-compat: honor -DUSE_HWY=OFF by mapping it to OIIO_USE_HWY if the latter
121+
# was not explicitly provided.
122+
if (DEFINED USE_HWY AND NOT DEFINED OIIO_USE_HWY)
123+
set (OIIO_USE_HWY ${USE_HWY} CACHE BOOL
124+
"Enable Google Highway SIMD optimizations (if Highway is available)" FORCE)
125+
else ()
126+
option (OIIO_USE_HWY "Enable Google Highway SIMD optimizations (if Highway is available)" ON)
127+
endif ()
118128

119129
set (OIIO_LIBNAME_SUFFIX "" CACHE STRING
120130
"Optional name appended to ${PROJECT_NAME} libraries that are built")

0 commit comments

Comments
 (0)