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>
This commit is contained in:
parent
4511075fb4
commit
aaf0b72a81
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user