From 565ae6e07115186e0338e4b7948a725c47712da5 Mon Sep 17 00:00:00 2001 From: Artem Chikin Date: Mon, 11 Oct 2021 15:34:47 -0700 Subject: [PATCH] Bump required CMake version to 3.19.6 Matching the Swift compiler's required CMake version. Also removes CMake < 3.17 workaround. --- CMakeLists.txt | 2 +- Sources/swift-driver/CMakeLists.txt | 19 +------------------ Sources/swift-help/CMakeLists.txt | 16 +--------------- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e88c60d3..b2e35adee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ # See http://swift.org/LICENSE.txt for license information # See http://swift.org/CONTRIBUTORS.txt for Swift project authors -cmake_minimum_required(VERSION 3.15.1) +cmake_minimum_required(VERSION 3.19.6) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) diff --git a/Sources/swift-driver/CMakeLists.txt b/Sources/swift-driver/CMakeLists.txt index 199b91351..168fda973 100644 --- a/Sources/swift-driver/CMakeLists.txt +++ b/Sources/swift-driver/CMakeLists.txt @@ -10,21 +10,4 @@ add_executable(swift-driver main.swift) target_link_libraries(swift-driver PUBLIC SwiftDriver - SwiftDriverExecution) - -# This is a fairly egregious workaround for the fact that in versions < 3.17, -# executables do not get `-rpath` linker arguments for their linked library -# dependencies (direct and transitive) -if(CMAKE_VERSION VERSION_LESS 3.17) - get_target_property(TSC_UTIL_LIB TSCUtility LOCATION) - get_filename_component(TSC_LIB_DIR ${TSC_UTIL_LIB} DIRECTORY) - - get_target_property(LLBUILD_LIB llbuildSwift LOCATION) - get_filename_component(LLBUILD_LIB_DIR ${LLBUILD_LIB} DIRECTORY) - - get_target_property(ARGPARSE_LIB ArgumentParser LOCATION) - get_filename_component(ARGPARSE_LIB_DIR ${ARGPARSE_LIB} DIRECTORY) - - set_property(TARGET swift-driver PROPERTY BUILD_RPATH - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY};${TSC_LIB_DIR};${LLBUILD_LIB_DIR};${ARGPARSE_LIB_DIR}) -endif() + SwiftDriverExecution) \ No newline at end of file diff --git a/Sources/swift-help/CMakeLists.txt b/Sources/swift-help/CMakeLists.txt index ac9b3ddb3..8969fb065 100644 --- a/Sources/swift-help/CMakeLists.txt +++ b/Sources/swift-help/CMakeLists.txt @@ -11,18 +11,4 @@ add_executable(swift-help target_link_libraries(swift-help PUBLIC SwiftOptions ArgumentParser - TSCBasic) - -# This is a fairly egregious workaround for the fact that in versions < 3.17, -# executables do not get `-rpath` linker arguments for their linked library -# dependencies (direct and transitive) -if(CMAKE_VERSION VERSION_LESS 3.17) - get_target_property(TSC_UTIL_LIB TSCUtility LOCATION) - get_filename_component(TSC_LIB_DIR ${TSC_UTIL_LIB} DIRECTORY) - - get_target_property(ARGPARSE_LIB ArgumentParser LOCATION) - get_filename_component(ARGPARSE_LIB_DIR ${ARGPARSE_LIB} DIRECTORY) - - set_property(TARGET swift-help PROPERTY BUILD_RPATH - ${CMAKE_LIBRARY_OUTPUT_DIRECTORY};${TSC_LIB_DIR};${ARGPARSE_LIB_DIR}) -endif() + TSCBasic) \ No newline at end of file