[Cmake-commits] CMake branch, next, updated. v2.8.12.2-7511-g02cc73a

Nils Gladitz nilsgladitz at gmail.com
Fri Feb 7 09:46:43 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  02cc73a83cf97bfc8068eba063b16f3dc5f6872e (commit)
       via  74c3875b3357a428c5a94c250b8008a3135a444b (commit)
       via  cafc60efcdb75ed1900f02a2970435c322844e4e (commit)
      from  2f58f2bfd862f464029a38b8c2b74ce5a8722c8a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=02cc73a83cf97bfc8068eba063b16f3dc5f6872e
commit 02cc73a83cf97bfc8068eba063b16f3dc5f6872e
Merge: 2f58f2b 74c3875
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Feb 7 09:46:42 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 7 09:46:42 2014 -0500

    Merge topic 'gcc-ipo' into next
    
    74c3875b IPO: output IPO specific variables to determine if IPO is in use
    cafc60ef IPO: involve gcc-ar and gcc-ranlib in LTO test as well


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74c3875b3357a428c5a94c250b8008a3135a444b
commit 74c3875b3357a428c5a94c250b8008a3135a444b
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Feb 7 15:43:45 2014 +0100
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Fri Feb 7 15:43:45 2014 +0100

    IPO: output IPO specific variables to determine if IPO is in use

diff --git a/Tests/IPO/CMakeLists.txt b/Tests/IPO/CMakeLists.txt
index 6dabf86..b45ec89 100644
--- a/Tests/IPO/CMakeLists.txt
+++ b/Tests/IPO/CMakeLists.txt
@@ -1,5 +1,13 @@
 cmake_minimum_required (VERSION 2.8)
-project(IPO NONE)
+project(IPO C)
+
+message("======== IPO specific variables ======")
+get_cmake_property(variables VARIABLES)
+foreach(variable ${variables})
+  if("${variable}xxx" MATCHES "_IPOxxx")
+    message("${variable}: [${${variable}}]")
+  endif()
+endforeach()
 
 set_property(DIRECTORY PROPERTY INTERPROCEDURAL_OPTIMIZATION 1)
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cafc60efcdb75ed1900f02a2970435c322844e4e
commit cafc60efcdb75ed1900f02a2970435c322844e4e
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Feb 7 15:43:05 2014 +0100
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Fri Feb 7 15:43:05 2014 +0100

    IPO: involve gcc-ar and gcc-ranlib in LTO test as well

diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake
index c135ec3..e40fa9f 100644
--- a/Modules/Compiler/GNU.cmake
+++ b/Modules/Compiler/GNU.cmake
@@ -83,16 +83,40 @@ macro(__compiler_gnu lang)
     endif()
 
     if(NOT DEFINED CMAKE_${lang}_PASSED_LTO_TEST)
+      set(__output_dir "${CMAKE_PLATFORM_INFO_DIR}/LtoTest${lang}")
+      file(MAKE_DIRECTORY "${__output_dir}")
+      set(__output_base "${__output_dir}/lto-test-${lang}")
+
       execute_process(
-        COMMAND ${CMAKE_COMMAND} -E echo "int main() {}"
-        COMMAND ${CMAKE_${lang}_COMPILER} ${__lto_flags} -xc -
-          -o ${CMAKE_PLATFORM_INFO_DIR}/lto-test-${lang}
+        COMMAND ${CMAKE_COMMAND} -E echo "void foo() {}"
+        COMMAND ${CMAKE_${lang}_COMPILER} ${__lto_flags} -c -xc -
+          -o ${__output_base}.o
         RESULT_VARIABLE __result
         ERROR_QUIET
         OUTPUT_QUIET
       )
 
-      set(__lto_found FALSE)
+      if("${__result}" STREQUAL "0")
+        execute_process(
+          COMMAND ${CMAKE_GCC_AR} cr ${__output_base}.a ${__output_base}.o
+          COMMAND ${CMAKE_GCC_RANLIB} ${__output_base}.a
+          RESULT_VARIABLE __result
+          ERROR_QUIET
+          OUTPUT_QUIET
+        )
+      endif()
+
+      if("${__result}" STREQUAL "0")
+        execute_process(
+          COMMAND ${CMAKE_COMMAND} -E echo "void foo(); int main() {foo();}"
+          COMMAND ${CMAKE_${lang}_COMPILER} ${__lto_flags} -xc -
+            -x none ${__output_base}.a -o ${__output_base}
+          RESULT_VARIABLE __result
+          ERROR_QUIET
+          OUTPUT_QUIET
+        )
+      endif()
+
       if("${__result}" STREQUAL "0")
         set(__lto_found TRUE)
       endif()

-----------------------------------------------------------------------

Summary of changes:
 Modules/Compiler/GNU.cmake |   32 ++++++++++++++++++++++++++++----
 Tests/IPO/CMakeLists.txt   |   10 +++++++++-
 2 files changed, 37 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list