[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3069-g72ae5d2

Stephen Kelly steveire at gmail.com
Sat Jul 13 08:21:39 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  72ae5d2709f67f77b9da4d16678f2025353e657b (commit)
       via  60a2d21773e1ed73eabe4551814eb21f605da134 (commit)
      from  e115256ac2752ce1dba98ff045e80083ec456822 (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=72ae5d2709f67f77b9da4d16678f2025353e657b
commit 72ae5d2709f67f77b9da4d16678f2025353e657b
Merge: e115256 60a2d21
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jul 13 08:21:38 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jul 13 08:21:38 2013 -0400

    Merge topic 'obsolete-qt4-macros' into next
    
    60a2d21 Fix ObsoleteQtMacros test.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60a2d21773e1ed73eabe4551814eb21f605da134
commit 60a2d21773e1ed73eabe4551814eb21f605da134
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Jul 13 14:21:03 2013 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Jul 13 14:21:03 2013 +0200

    Fix ObsoleteQtMacros test.

diff --git a/Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt b/Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt
index 85c94b3..6f7e8ee 100644
--- a/Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt
+++ b/Tests/RunCMake/ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt
@@ -1,5 +1,5 @@
 CMake Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
   The qt4_automoc macro is obsolete.  Use the CMAKE_AUTOMOC feature instead.
 Call Stack \(most recent call first\):
-  AutomocMacro-WARN.cmake:9 \(qt4_automoc\)
+  AutomocMacro-WARN.cmake:7 \(qt4_automoc\)
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt b/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt
index 64d8397..2d0ed8a 100644
--- a/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt
+++ b/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN-stderr.txt
@@ -1,6 +1,8 @@
+QMAKE_EXECUTABLE.*
+TESTQTVERSION.*
 CMake Warning at .*/Modules/Qt4Macros.cmake:[^ ]+ \(message\):
   The qt4_use_modules function is obsolete.  Use target_link_libraries with
   IMPORTED targets instead.
 Call Stack \(most recent call first\):
-  UseModulesMacro-WARN.cmake:9 \(qt4_use_modules\)
+  UseModulesMacro-WARN.cmake:[^ ]+ \(qt4_use_modules\)
   CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN.cmake b/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN.cmake
index b78554c..ff7aef5 100644
--- a/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN.cmake
+++ b/Tests/RunCMake/ObsoleteQtMacros/UseModulesMacro-WARN.cmake
@@ -1,4 +1,25 @@
 
+function(QUERY_QMAKE VAR RESULT)
+  execute_process(COMMAND "${QT_QMAKE_EXECUTABLE}" -query ${VAR}
+    RESULT_VARIABLE return_code
+    OUTPUT_VARIABLE output
+    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE)
+  if(NOT return_code)
+    file(TO_CMAKE_PATH "${output}" output)
+    set(${RESULT} ${output} PARENT_SCOPE)
+  endif()
+endfunction()
+
+function(get_version_components VERSION RESULT_MAJOR RESULT_MINOR RESULT_PATCH)
+  string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}")
+  string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}")
+  string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}")
+
+  set(${RESULT_MAJOR} ${QT_VERSION_MAJOR} PARENT_SCOPE)
+  set(${RESULT_MINOR} ${QT_VERSION_MINOR} PARENT_SCOPE)
+  set(${RESULT_PATCH} ${QT_VERSION_PATCH} PARENT_SCOPE)
+endfunction()
+
 function(test_find_qmake QMAKE_NAMES QMAKE_RESULT VERSION_RESULT)
   list(LENGTH QMAKE_NAMES QMAKE_NAMES_LEN)
   if(${QMAKE_NAMES_LEN} EQUAL 0)
@@ -18,8 +39,8 @@ function(test_find_qmake QMAKE_NAMES QMAKE_RESULT VERSION_RESULT)
 
   set(major 0)
   if (QT_QMAKE_EXECUTABLE)
-    _qt4_query_qmake(QT_VERSION QTVERSION)
-    _qt4_get_version_components("${QTVERSION}" major minor patch)
+    query_qmake(QT_VERSION QTVERSION)
+    get_version_components("${QTVERSION}" major minor patch)
   endif()
 
   if (NOT QT_QMAKE_EXECUTABLE OR NOT "${major}" EQUAL 4)
@@ -30,7 +51,7 @@ function(test_find_qmake QMAKE_NAMES QMAKE_RESULT VERSION_RESULT)
     list(REMOVE_AT QMAKE_NAMES 0)
     test_find_qmake("${QMAKE_NAMES}" QMAKE QTVERSION)
 
-    _qt4_get_version_components("${QTVERSION}" major minor patch)
+    get_version_components("${QTVERSION}" major minor patch)
     if (NOT ${major} EQUAL 4)
       # Restore possibly found qmake and it's version; these are used later
       # in error message if incorrect version is found

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

Summary of changes:
 .../ObsoleteQtMacros/AutomocMacro-WARN-stderr.txt  |    2 +-
 .../UseModulesMacro-WARN-stderr.txt                |    4 ++-
 .../ObsoleteQtMacros/UseModulesMacro-WARN.cmake    |   27 +++++++++++++++++--
 3 files changed, 28 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list