Don't enable fallback test unless fallback is explicitly selected

This commit is contained in:
John Keiser 2020-09-10 12:24:52 -07:00
parent f4963cd1c5
commit 99bc591366
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,7 @@ if(NOT SIMDJSON_IMPLEMENTATION_FALLBACK)
target_compile_definitions(simdjson-internal-flags INTERFACE SIMDJSON_IMPLEMENTATION_FALLBACK=0)
endif()
# e.g. SIMDJSON_IMPLEMENTATION="haswell;westmere;-fallback"
set(SIMDJSON_IMPLEMENTATION "" CACHE STRING "Implementations to include/exclude: semicolon separated list of architectures (haswell/westmere/arm64/fallback). Prepend with - to force an implementation off. (e.g. -DSIMDJSON_IMPLEMENTATION=\"haswell;-fallback\") Defaults to compile-time detection.")
set(SIMDJSON_IMPLEMENTATION "" CACHE STRING "Implementations to include/exclude: semicolon separated list of architectures (haswell/westmere/arm64/fallback). Prepend with - to force an implementation off. (e.g. -DSIMDJSON_IMPLEMENTATION=\"haswell;-fallback\" .) Defaults to compile-time detection.")
foreach(implementation ${SIMDJSON_IMPLEMENTATION})
string(TOUPPER ${implementation} implementation_upper)
string(SUBSTRING ${implementation_upper} 0 1 first_char)

View File

@ -110,7 +110,7 @@ if (BASH AND (NOT WIN32) AND SIMDJSON_BASH AND (TARGET json2json)) # The scripts
#
# SIMDJSON_FORCE_IMPLEMENTATION tests: run json2json with SIMDJSON
#
if (SIMDJSON_IMPLEMENTATION_FALLBACK)
if (SIMDJSON_IMPLEMENTATION MATCHES "fallback")
add_test(
NAME simdjson_force_implementation
COMMAND