[Cmake-commits] CMake branch, next, updated. v2.8.5-1636-g002cdea

Alexander Neundorf neundorf at kde.org
Wed Aug 17 17:42:12 EDT 2011


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  002cdea27f71bd21c37a8760f4c2355bb64193c3 (commit)
       via  7d693108faa0df924944eb2b5ced210d735d75b1 (commit)
      from  3bb8ce85672404c1c8fa4900f00696d14b16a65a (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=002cdea27f71bd21c37a8760f4c2355bb64193c3
commit 002cdea27f71bd21c37a8760f4c2355bb64193c3
Merge: 3bb8ce8 7d69310
Author:     Alexander Neundorf <neundorf at kde.org>
AuthorDate: Wed Aug 17 17:42:10 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 17 17:42:10 2011 -0400

    Merge topic 'UsingCMakeLikePkgConfig2' into next
    
    7d69310 Only enable the test when using GNU make


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d693108faa0df924944eb2b5ced210d735d75b1
commit 7d693108faa0df924944eb2b5ced210d735d75b1
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Wed Aug 17 23:44:34 2011 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Wed Aug 17 23:44:34 2011 +0200

    Only enable the test when using GNU make
    
    The makefile used in the test uses $(shell ...), which is
    AFAIK a GNU extension, and will probably not work e.g. with OpenBSD make.
    According to the FreeBSD make manpage their make has a != assignment,
    which seems to do something similar, but I don't have such a system
    around for testing.
    Also, the point of this test is not to write a portable makefile,
    but to check whether cmake --find-package prints a correct string.
    
    Alex

diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
index 17f02b4..def8d63 100644
--- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt
+++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
@@ -1,20 +1,30 @@
 
 
-# the test program links against the png lib, so test first whether it exists
 if(UNIX  AND  "${CMAKE_GENERATOR}" MATCHES "Makefile")
 
-  # build a library which we can search during the test
-  add_library(foo STATIC foo.cpp)
+  # Test whether the make is GNU make, and only add the test in this case,
+  # since the configured makefile in this test uses $(shell ...), which
+  # is AFAIK a GNU make extension. Alex
+  execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} -v
+                  OUTPUT_VARIABLE makeVersionOutput
+                  TIMEOUT 10)
+  string(TOUPPER "${makeVersionOutput}" MAKE_VERSION_OUTPUT)
+  if("${MAKE_VERSION_OUTPUT}" MATCHES ".*GNU MAKE.*")
 
-  # configure a FindFoo.cmake so it knows where the library can be found
-  configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY)
+    # build a library which we can search during the test
+    add_library(foo STATIC foo.cpp)
 
-  # now set up the test:
-  get_target_property(cmakeExecutable cmake LOCATION)
+    # configure a FindFoo.cmake so it knows where the library can be found
+    configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY)
 
-  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)
+    # now set up the test:
+    get_target_property(cmakeExecutable cmake LOCATION)
 
-  add_test(FindPackageModeMakefileTest ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile )
+    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)
+
+    add_test(FindPackageModeMakefileTest ${CMAKE_MAKE_PROGRAM} -f ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile )
+
+  endif()
 
 endif()

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

Summary of changes:
 Tests/FindPackageModeMakefileTest/CMakeLists.txt |   30 ++++++++++++++-------
 1 files changed, 20 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list