Skip to content

Bump required CMake version to 3.19.6 #871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
19 changes: 1 addition & 18 deletions Sources/swift-driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
16 changes: 1 addition & 15 deletions Sources/swift-help/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)