From 266991740b39d5cbb9e2cefdb0ee11abe0b46fd3 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 19 Feb 2020 11:35:39 +0100 Subject: [PATCH] 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 --- cmake/QtCreatorAPI.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/QtCreatorAPI.cmake b/cmake/QtCreatorAPI.cmake index bd9b6ac7901..c2bd8604308 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}