Users should be the ones to choose to add -flto or not and how. The test may also cause unnecessary noise wrt https://bugs.gentoo.org/830950 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,13 +42,4 @@ # enable global link time optimization -cmake_policy(SET CMP0069 NEW) -set(CMAKE_POLICY_DEFAULT_CMP0069 NEW) -include(CheckIPOSupported) -check_ipo_supported(RESULT ipo_supported OUTPUT ipo_supported_output) -if(ipo_supported) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) -else() - message(WARNING "IPO is not supported: ${ipo_supported_output}") -endif() if(USE_SYSTEM_NCNN)