summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2022-03-03 09:48:43 +0100
committerEike Ziller <eike.ziller@qt.io>2022-03-03 09:33:05 +0000
commitacd7445c6e06df5afe9efef50cacbc1da30c5045 (patch)
treee3d16b72a9f5a45fa273bc2988ad0c66430ffb4d /cmake
parentb78b7d065f64de51c24e03a3dcc0148392c47b7a (diff)
downloadqt-creator-acd7445c6e06df5afe9efef50cacbc1da30c5045.tar.gz
Do not require CMake 3.18
Amends 46f6c5d0055c05941d68a7255d35b3eaba9d7de3 Simply disable this safe-guard for < 3.18. Change-Id: I0ae3b7520a913861c8c9f97ec7e01e5c9c00d362 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtCreatorAPIInternal.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/QtCreatorAPIInternal.cmake b/cmake/QtCreatorAPIInternal.cmake
index 5257d5bf6b..2278932a02 100644
--- a/cmake/QtCreatorAPIInternal.cmake
+++ b/cmake/QtCreatorAPIInternal.cmake
@@ -4,7 +4,10 @@ if (CMAKE_VERSION VERSION_LESS 3.18)
endif()
endif()
-include(CheckLinkerFlag)
+if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
+ include(CheckLinkerFlag)
+endif()
+
include(FeatureSummary)
#
@@ -163,6 +166,8 @@ function(qtc_enable_sanitize _sanitize_flags)
endfunction()
function(qtc_add_link_flags_no_undefined target)
+ # needs CheckLinkerFlags
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
set(no_undefined_flag "-Wl,--no-undefined")
check_linker_flag(CXX ${no_undefined_flag} QTC_LINKER_SUPPORTS_NO_UNDEFINED)
if (NOT QTC_LINKER_SUPPORTS_NO_UNDEFINED)
@@ -173,6 +178,7 @@ function(qtc_add_link_flags_no_undefined target)
endif()
endif()
target_link_options("${target}" PRIVATE "${no_undefined_flag}")
+ endif()
endfunction()
function(append_extra_translations target_name)