[Pkg-owncloud-commits] [owncloud-client] 10/211: Q_DECL_OVERRIDE for Qt4 only for GCC >= 4.7

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 9d5d6aff3885d48dfc3ba733d35a89ac42b103d7
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Wed Oct 8 18:55:41 2014 +0200

    Q_DECL_OVERRIDE for Qt4 only for GCC >= 4.7
---
 cmake/modules/QtVersionAbstraction.cmake | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/cmake/modules/QtVersionAbstraction.cmake b/cmake/modules/QtVersionAbstraction.cmake
index b76fa62..ab6b77a 100644
--- a/cmake/modules/QtVersionAbstraction.cmake
+++ b/cmake/modules/QtVersionAbstraction.cmake
@@ -153,7 +153,16 @@ if(NOT Qt5Core_FOUND)
         include( ${QT_USE_FILE} )
     endmacro()
 
-    add_definitions("-DQ_DECL_OVERRIDE=override")
+    if (CMAKE_COMPILER_IS_GNUCC)
+        execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
+                OUTPUT_VARIABLE GCC_VERSION)
+        if (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7)
+            add_definitions("-DQ_DECL_OVERRIDE=override")
+        else()
+            add_definitions("-DQ_DECL_OVERRIDE=")
+        endif()
+    endif()
+
 endif()
 
 if( Qt5Core_DIR )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list