aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2019-09-15 14:33:40 +0200
committerPeter Wu <peter@lekensteyn.nl>2019-09-15 18:06:23 +0000
commitcacccb57db55965a556726dfdd7556c7c6afa066 (patch)
tree40902c93333fcef0d7ca6df81753f80ceee6a707 /CMakeLists.txt
parentc556f307c9cb58ede24ee47e436c2a2ae060d2b8 (diff)
CMake: Reverse CheckPIESupported version check logic
Instead of checking for CMake version greater than "3.13.999" check for version lower than "3.14". This fixes the condition for current Pengwin releases which do ship with CMake version "3.13.18112701-MSVC_2". Change-Id: Ib5fc494d7fd42625e24ddac55af8aa92f0e983ec Reviewed-on: https://code.wireshark.org/review/34535 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca4d973bf2..731b68dce2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -947,14 +947,14 @@ if(NOT CMAKE_C_COMPILER_ID MATCHES "MSVC" AND NOT OSS_FUZZ)
# independent may fail, the user can set CMAKE_EXE_LINKER_FLAGS=-no-pie
# as a workaround.
#
- if(CMAKE_VERSION VERSION_GREATER "3.13.999")
- include(CheckPIESupported)
- check_pie_supported()
- else()
+ if(CMAKE_VERSION VERSION_LESS "3.14")
check_c_linker_flag(-pie LINK_pie_VALID)
if(LINK_pie_VALID)
set(CMAKE_EXE_LINKER_FLAGS "-pie ${CMAKE_EXE_LINKER_FLAGS}")
endif()
+ else()
+ include(CheckPIESupported)
+ check_pie_supported()
endif()
endif()