diff --git a/CMakeLists.txt b/CMakeLists.txt index 70f35f5a2..c3aaacce7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,6 +114,9 @@ elseif(UNIX) set(INSTALL_RTM_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/openrtm-${RTM_MAJOR_VERSION}.${RTM_MINOR_VERSION}/cmake) set(INSTALL_RTM_ETC_DIR ${CMAKE_INSTALL_SYSCONFDIR}) set(INSTALL_RTM_SHARE_DIR ${CMAKE_INSTALL_DATAROOTDIR}) + if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.0.0) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-aggressive-loop-optimizations --param max-inline-insns-single=1000 --param inline-unit-growth=1000") + endif() else() set(INSTALL_RTM_SCRIPT_DIR lib/openrtm-${RTM_MAJOR_VERSION}.${RTM_MINOR_VERSION}/py_helper) set(INSTALL_RTM_BIN_DIR bin) @@ -685,7 +688,7 @@ function(openrtm_common_set_compile_options target) -Wstrict-null-sentinel -Wstrict-overflow=5 $<$: -Wstringop-overflow=4> - $<$: -Wsuggest-attribute=cold> + $<$: -Wsuggest-attribute=cold> -Wsuggest-attribute=format $<$: -Wsuggest-attribute=malloc> $<$: -Wsuggest-override>