aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-02-19 11:35:39 +0100
committerCristian Adam <cristian.adam@qt.io>2020-02-19 13:59:01 +0000
commit266991740b39d5cbb9e2cefdb0ee11abe0b46fd3 (patch)
treedfea3a61e2a637933845dff884ae576e8d0ce918 /cmake
parent9a09dd8a884827401193846be70c9cec1ca6610a (diff)
CMake Build: Set CXX_EXTENSIONS to OFF for QtCreator plugins
This makes sure that if you have a plugin and set the C++ standard to 14, but forget to set CXX_EXTENSIONS to OFF you don't get weird PCH compilation failures. Change-Id: I66edf6431624f667ba400e8ef79f2ad6170e3ca2 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPI.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake
index bd9b6ac790..c2bd860430 100644
--- a/cmake/QtCreatorAPI.cmake
+++ b/cmake/QtCreatorAPI.cmake
@@ -536,6 +536,7 @@ function(add_qtc_library name)
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
VERSION "${IDE_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}"
+ CXX_EXTENSIONS OFF
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
BUILD_RPATH "${_LIB_RPATH}"
@@ -781,6 +782,7 @@ function(add_qtc_plugin target_name)
qtc_output_binary_dir(_output_binary_dir)
set_target_properties(${target_name} PROPERTIES
SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}"
+ CXX_EXTENSIONS OFF
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
_arg_DEPENDS "${_arg_PLUGIN_DEPENDS}"
@@ -991,6 +993,7 @@ function(add_qtc_executable name)
INSTALL_RPATH "${install_rpath}"
RUNTIME_OUTPUT_DIRECTORY "${_output_binary_dir}/${_DESTINATION}"
QT_SKIP_TRANSLATION "${skip_translation}"
+ CXX_EXTENSIONS OFF
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN ON
${_arg_PROPERTIES}