From 508f1f81be721dce1133172000f8949e0b4853f8 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Tue, 28 Jan 2025 15:37:07 +0200 Subject: [PATCH] disable IPO for GCC --- cmake/functions/SetCompilerSettings.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/functions/SetCompilerSettings.cmake b/cmake/functions/SetCompilerSettings.cmake index 1778a36..71ffee4 100644 --- a/cmake/functions/SetCompilerSettings.cmake +++ b/cmake/functions/SetCompilerSettings.cmake @@ -1,10 +1,12 @@ include(CheckIPOSupported) function(SetOptimisationSettings) - check_ipo_supported(RESULT result) - if(result) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE PARENT_SCOPE) - endif () + if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + check_ipo_supported(RESULT result) + if(result) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE PARENT_SCOPE) + endif() + endif() if (LINUX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native" PARENT_SCOPE)