summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2016-01-06 17:37:13 +0100
committerKevin Funk <kfunk@kde.org>2016-01-06 17:34:37 +0000
commitaaf0b72a816ba430442d4ea956db95fa8e286e9f (patch)
tree9d383f094db9940157832d80c6e17ba1a4d8693e /src/corelib
parent4511075fb40de3ecdb39dc8345b1df0c547d781c (diff)
CMake: Enable C++11 support on Qt5 targets
Implicitly add the minimum required `-std=...` to Qt5 module targets. Use the newly introduced INTERFACE_COMPILE_FEATURES property for this, which is available starting from CMake version 3.1. This also fixes the Qt5 CMake tests, which previously try-compiled projects using Qt 5.7 headers in non-C++11 mode, thus failed. Change-Id: I54fc0e07403b646b5d6ac3ab6b8b47119b4feef6 Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 65fd1f9383..8242682a89 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -93,6 +93,8 @@ set(Qt5_DISABLED_FEATURES
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
+set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
+
!!IF contains(QT_CONFIG, reduce_exports)
set(QT_VISIBILITY_AVAILABLE \"True\")
!!ENDIF