diff --git a/CMakeLists.txt b/CMakeLists.txt index aa8826df0..6f3b57bc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ project(${PROJECT_NAME} C CXX) option(USE_AVX2 "enable avx2 code" OFF) option(USE_NETNS "enable networking namespace support. Linux only" OFF) option(AMD_RYZEN_HACK "hack for AMD Ryzen FPU bug (support FMA3 and FMA4 in FPU, but does not show in CPUID)" OFF) -option(NATIVE_BUILD "optimise for host system and FPU, may not be portable" ON) +option(NATIVE_BUILD "optimise for host system and FPU" ON) option(EMBEDDED_CFG "optimise for older hardware or embedded systems" OFF) if (NOT MSVC) option(STATIC_LINK "link statically against dependencies" OFF) @@ -178,7 +178,6 @@ if(AMD_RYZEN_HACK AND USE_AVX2) endif(AMD_RYZEN_HACK AND USE_AVX2) if(NATIVE_BUILD) - # message(WARNING "May fail at runtime if the floating-point unit on the target system does not implement required features, some platforms will check this for you") set(CRYPTO_FLAGS -march=native -mtune=native) endif() @@ -188,9 +187,7 @@ if(EMBEDDED_CFG) set(CRYPTO_FLAGS -march=i486 -mtune=i486) endif() -if (NOT MSVC OR NOT MSVC_VERSION) - add_compile_options(${OPTIMIZE_FLAGS} ${CRYPTO_FLAGS}) -endif() +add_compile_options(${OPTIMIZE_FLAGS} ${CRYPTO_FLAGS}) add_subdirectory(vendor/gtest) add_subdirectory(${ABSEIL_DIR})