You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a CORRADE_BUILD_TESTS_FORCE_CPU_POINTER_DISPATCH option.
The tests will be implicitly configured to use function pointers for
CPU dispatch, but since it adds significant overhead on Emscripten,
there also needs to be a way to disable this.
Copy file name to clipboardexpand all lines: CMakeLists.txt
+5
Original file line number
Diff line number
Diff line change
@@ -256,6 +256,11 @@ cmake_dependent_option(CORRADE_CPU_USE_IFUNC "Allow using GNU IFUNC for runtime
256
256
# negative perf consequences, enable it by default only on platforms that have
257
257
# IFUNC, and thus can avoid the function pointer indirection.
258
258
option(CORRADE_BUILD_CPU_RUNTIME_DISPATCH "Build with runtime dispatch for CPU-dependent functionality"${_CORRADE_CPU_CAN_USE_IFUNC})
259
+
# Enabled by default and independent of CORRADE_BUILD_CPU_RUNTIME_DISPATCH as
260
+
# correctness is important. It can however negatively affect performance
261
+
# compared to IFUNC or compile-time dispatch, so make it possible to disable
262
+
# this for benchmarks.
263
+
cmake_dependent_option(CORRADE_BUILD_TESTS_FORCE_CPU_POINTER_DISPATCH "Force pointer-based dispatch for unit tests to verify all variants of CPU-dependent functionality"ON"CORRADE_BUILD_TESTS"OFF)
259
264
260
265
# Backwards compatibility for unprefixed CMake options. If the user isn't
261
266
# explicitly using prefixed options in the first run already, accept the
0 commit comments