We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6afe9cb commit e7bda61Copy full SHA for e7bda61
CMakeLists.txt
@@ -2114,7 +2114,11 @@ target_compile_definitions(freight_static PUBLIC
2114
-DNDEBUG
2115
)
2116
target_compile_options(freight_static PRIVATE $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-w>)
2117
-target_compile_options(freight_static PUBLIC $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-march=native>)
+# -march=native on x86 so crc32() uses hardware SSE4.2 (matching the CLI).
2118
+# Skip on ARM — the crc32 fallback (fnv2a) is used there regardless.
2119
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|i[3-6]86")
2120
+ target_compile_options(freight_static PUBLIC -march=native)
2121
+endif()
2122
2123
if(OpenMP_CXX_FOUND)
2124
target_link_libraries(freight_static PUBLIC OpenMP::OpenMP_CXX)
0 commit comments