File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,19 @@ nav2_package()
3636
3737include (CheckCXXCompilerFlag)
3838
39+ check_cxx_compiler_flag("-mno-avx512f" COMPILER_SUPPORTS_AVX512)
40+ check_cxx_compiler_flag("-msse4.2" COMPILER_SUPPORTS_SSE4)
3941check_cxx_compiler_flag("-mavx2" COMPILER_SUPPORTS_AVX2)
4042check_cxx_compiler_flag("-mfma" COMPILER_SUPPORTS_FMA)
4143
44+ if (COMPILER_SUPPORTS_AVX512)
45+ add_compile_options (-mno-avx512f)
46+ endif ()
47+
48+ if (COMPILER_SUPPORTS_SSE4)
49+ add_compile_options (-msse4.2)
50+ endif ()
51+
4252if (COMPILER_SUPPORTS_AVX2)
4353 add_compile_options (-mavx2)
4454endif ()
@@ -48,7 +58,7 @@ if(COMPILER_SUPPORTS_FMA)
4858endif ()
4959
5060# If building one the same hardware to be deployed on, try `-march=native`!
51- add_compile_options (-O3 -finline-limit=10000000 -ffp-contract=fast -ffast-math -mtune=generic -mno-avx512f )
61+ add_compile_options (-O3 -finline-limit=10000000 -ffp-contract=fast -ffast-math -mtune=generic)
5262
5363add_library (mppi_controller SHARED
5464 src/controller.cpp
You can’t perform that action at this time.
0 commit comments