You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2022/02/11 17:02:02 UTC

[qpid-dispatch] 01/01: DO NOT MERGE try what lto does; this needs cmake 3.9 so it will break in places, but I want to see what happens

This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch jd_lto
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit cd8567621a083f104ed060eb4ef9d71e85fe9993
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Fri Feb 11 18:01:44 2022 +0100

    DO NOT MERGE try what lto does; this needs cmake 3.9 so it will break in places, but I want to see what happens
---
 CMakeLists.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 914aaf6..7e46b35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,6 +90,16 @@ include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckIncludeFiles)
 include(CMakeDependentOption)
+include(CheckIPOSupported)
+
+check_ipo_supported(RESULT cc_has_ipo OUTPUT check_ipo_supported_output)
+message(STATUS "Interprocedural optimization (IPO/LTO) supported: ${cc_has_ipo}")
+if(NOT cc_has_ipo)
+    message(WARNING "IPO is not supported: ${output}")
+endif()
+if(NOT DEFINED(CMAKE_INTERPROCEDURAL_OPTIMIZATION))
+    set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ${cc_has_ipo})
+endif()
 
 ##
 ## Find dependencies

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org