diff --git a/init_target.cmake b/init_target.cmake index 6eb1a83..c7a1244 100644 --- a/init_target.cmake +++ b/init_target.cmake @@ -34,14 +34,6 @@ function(init_target target_name) # init_target(my_target folder_name) XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $,0,fast> XCODE_ATTRIBUTE_LLVM_LTO $,NO,YES> ) - if (LINUX) - target_compile_options(${target_name} PUBLIC $,,-g -Ofast -fno-strict-aliasing>) - target_link_options(${target_name} PUBLIC $,,-g -Ofast>) - if (NOT build_linux32) - target_compile_options(${target_name} PUBLIC $,,-flto>) - target_link_options(${target_name} PUBLIC $,,-flto -fuse-linker-plugin>) - endif() - endif() if (WIN32) set_target_properties(${target_name} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE True diff --git a/options_linux.cmake b/options_linux.cmake index ad14dc5..a6a13c9 100644 --- a/options_linux.cmake +++ b/options_linux.cmake @@ -6,7 +6,7 @@ target_compile_options(common_options INTERFACE - -g + $,,-Ofast -fno-strict-aliasing> -pipe -Wall -Werror @@ -23,9 +23,18 @@ INTERFACE -Wno-attributes -Wno-parentheses -Wno-stringop-overflow + -Wno-maybe-uninitialized -Wno-error=class-memaccess ) target_link_options(common_options INTERFACE - -g + $,,-Ofast> ) +if (build_linux32) + target_compile_options(common_options INTERFACE -g0) + target_link_options(common_options INTERFACE -g0) +else() + target_compile_options(common_options INTERFACE $,,-g -flto>) + target_link_options(common_options INTERFACE $,,-g -flto -fuse-linker-plugin>) +endif() +