summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-05-28 10:35:03 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-06-11 10:58:43 +0000
commit88f5955cb750f2fe3468fe13fef4a11b887315c1 (patch)
tree2d38af59cc1d4afa285ab37f82bfcfbc33657c09 /cmake
parent8a665ba9a660a09e5e6ac7cce2272118e303c220 (diff)
CMake: up the minimum C version to C11
We're in 2022. A 11-year-old C standard probably suffices, especially since we require C++17 anyway. Pick-to: 6.4 Change-Id: Ibcde9b9795ad42ac9978fffd16f3555327097ded Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtFlagHandlingHelpers.cmake7
1 files changed, 2 insertions, 5 deletions
diff --git a/cmake/QtFlagHandlingHelpers.cmake b/cmake/QtFlagHandlingHelpers.cmake
index e678e66beb..c7f77d9dd4 100644
--- a/cmake/QtFlagHandlingHelpers.cmake
+++ b/cmake/QtFlagHandlingHelpers.cmake
@@ -238,11 +238,8 @@ function(qt_set_language_standards)
set(CMAKE_CXX_STANDARD 17 PARENT_SCOPE)
endif()
- if (c_std_11 IN_LIST CMAKE_C_COMPILE_FEATURES)
- set(CMAKE_C_STANDARD 11 PARENT_SCOPE)
- elseif (c_std_99 IN_LIST CMAKE_C_COMPILE_FEATURES)
- set(CMAKE_C_STANDARD 99 PARENT_SCOPE)
- endif()
+ set(CMAKE_C_STANDARD 11 PARENT_SCOPE)
+ set(CMAKE_C_STANDARD_REQUIRED ON PARENT_SCOPE)
endfunction()
function(qt_set_language_standards_interface_compile_features target)