diff --git a/CMakeLists.txt b/CMakeLists.txt index eebe604..ec3de7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ if(DEFINED EMSCRIPTEN) message(STATUS "For Emscripten SIMD use flags: \"-msimd128 -mrelaxed-simd -msse -msse2 -mavx\"") elseif(NOT MSVC) target_compile_options(Utily_Utily PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare") - message(STATUS "For Native SIMD use flags: \"-mavx2 -mavx512bw\"") + message(STATUS "For Native SIMD use flags: \"-march=native\"") endif() set_property(TARGET Utily_Utily PROPERTY EXPORT_NAME Utily) @@ -57,7 +57,7 @@ if(BUILD_UTILY_TESTS) set(CMAKE_EXECUTABLE_SUFFIX ".html") elseif(NOT MSVC) target_compile_options(UtilyTest PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare") - target_compile_options(UtilyTest PRIVATE -mavx2 -mavx512bw) + target_compile_options(UtilyTest PRIVATE -march=native) endif() target_link_libraries(UtilyTest PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main Utily::Utily) @@ -100,7 +100,7 @@ if(BUILD_UTILY_BENCHMARKS) target_compile_options(UtilyBenchmark PRIVATE -msimd128 -mrelaxed-simd -msse -msse2 -mavx) elseif(NOT MSVC) target_compile_options(UtilyBenchmark PRIVATE "-Wall" "-Wextra" "-Wpedantic" "-Wcast-align" "-Wcast-qual" "-Wctor-dtor-privacy" "-Wformat=2" "-Winit-self" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wold-style-cast" "-Woverloaded-virtual" "-Wredundant-decls" "-Wshadow" "-Wsign-conversion" "-Wsign-promo" "-Wstrict-overflow=5" "-Wswitch-default" "-Wundef" "-Wno-unused" "-Wconversion" "-Wsign-compare") - target_compile_options(UtilyBenchmark PRIVATE -mavx2 -mavx512bw) + target_compile_options(UtilyBenchmark PRIVATE -march=native) endif() target_link_libraries(UtilyBenchmark PRIVATE benchmark::benchmark benchmark::benchmark_main Utily::Utily) endif()