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>
This commit is contained in:
Tomasz Moń 2019-09-15 14:33:40 +02:00 committed by Peter Wu
parent c556f307c9
commit cacccb57db
1 changed files with 4 additions and 4 deletions

View File

@ -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()