[Cmake-commits] CMake branch, next, updated. v2.8.12-3755-g9037e19

Stephen Kelly steveire at gmail.com
Thu Oct 10 09:42:54 EDT 2013


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  9037e1978dcf9565faaed1d25da17e2fcd62137e (commit)
       via  9282c8fb3f4e1f34e569a308fc6dcd98a213e4d4 (commit)
      from  14a01b9c7fa64b90623cfce40b93b7323130abfe (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=9037e1978dcf9565faaed1d25da17e2fcd62137e
commit 9037e1978dcf9565faaed1d25da17e2fcd62137e
Merge: 14a01b9 9282c8f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 10 09:42:53 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Oct 10 09:42:53 2013 -0400

    Merge topic 'target-LOCATION-policy' into next
    
    9282c8f Only use the file(GENERATE) command with new CMake versions.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9282c8fb3f4e1f34e569a308fc6dcd98a213e4d4
commit 9282c8fb3f4e1f34e569a308fc6dcd98a213e4d4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Oct 10 15:42:11 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Oct 10 15:42:11 2013 +0200

    Only use the file(GENERATE) command with new CMake versions.

diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
index 7b634db..2a669b6 100644
--- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt
+++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
@@ -19,9 +19,17 @@ if(UNIX  AND  "${CMAKE_GENERATOR}" MATCHES "Makefile")
     configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY)
 
     # now set up the test:
-    file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
-      CONTENT "CMAKE = \"$<TARGET_FILE:cmake>\"\n"
-    )
+    if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
+      file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
+        CONTENT "CMAKE = \"$<TARGET_FILE:cmake>\"\n"
+      )
+    else()
+      cmake_policy(SET CMP0026 OLD)
+      get_target_property(cmakeLocation cmake LOCATION)
+      file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
+        "CMAKE = \"${cmakeLocation}\"\n"
+      )
+    endif()
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile @ONLY)
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp COPYONLY)
 

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

Summary of changes:
 Tests/FindPackageModeMakefileTest/CMakeLists.txt |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list