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 2021/08/11 14:51:33 UTC

[qpid-dispatch] branch main updated: DISPATCH-2121 Allow the -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON build option without warning (#1331)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3f13ee5  DISPATCH-2121 Allow the -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON build option without warning (#1331)
3f13ee5 is described below

commit 3f13ee5f1ddc18cfca8e3e8ab97818814b2aa932
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Wed Aug 11 16:51:27 2021 +0200

    DISPATCH-2121 Allow the -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON build option without warning (#1331)
    
    ```
    CMake Warning (dev) at router/CMakeLists.txt:35 (add_executable):
      Policy CMP0069 is not set: INTERPROCEDURAL_OPTIMIZATION is enforced when
      enabled.  Run "cmake --help-policy CMP0069" for policy details.  Use the
      cmake_policy command to set the policy and suppress this warning.
    
      INTERPROCEDURAL_OPTIMIZATION property will be ignored for target
      'qdrouterd'.
    ```
---
 CMakeLists.txt | 5 +++++
 README.adoc    | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 74f4074..cdf8679 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,11 @@ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
 set(CMAKE_MACOSX_RPATH TRUE)
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
+if (POLICY CMP0069)
+    # INTERPROCEDURAL_OPTIMIZATION is enforced when enabled.
+    cmake_policy (SET CMP0069 NEW)
+endif ()
+
 # https://bugzilla.redhat.com/show_bug.cgi?id=1850174 GCC 4.8 claims to support atomics, but it's missing stdatomic.h
 include(CheckIncludeFile)
 check_include_file("stdatomic.h" HAVE_STDATOMIC_H)
diff --git a/README.adoc b/README.adoc
index 710c74e..22cc1a4 100644
--- a/README.adoc
+++ b/README.adoc
@@ -316,4 +316,8 @@ Other options include `Debug` (disables optimizations) and `Coverage`.
 
 |`-DRUNTIME_CHECK=`
 |Enables C/C++ runtime checkers.See "Run Time Validation" chapter above.
+
+|`-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON`
+|With CMake 3.9+, compiles the project with LTO (Link Time Optimization) enabled.
+Older CMake will only honor this option with the Intel compiler on Linux.
 |===

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