Skip to content
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
1 change: 0 additions & 1 deletion Runtimes/Core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ add_link_options($<$<PLATFORM_ID:Linux>:LINKER:-z,defs>)
add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
"$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-runtime-compatibility-version none>"
"$<$<COMPILE_LANGUAGE:Swift>:-disable-autolinking-runtime-compatibility-dynamic-replacements>"
Expand Down
1 change: 0 additions & 1 deletion Runtimes/Overlay/Cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ target_compile_options(swiftCxx PRIVATE
# This module should not pull in the C++ standard library, so we disable it
# explicitly. For functionality that depends on the C++ stdlib, use C++
# stdlib overlay (`swiftstd` module).
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -nostdinc++>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature AllowUnsafeAttribute>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature BuiltinModule>"
Expand Down
1 change: 0 additions & 1 deletion Runtimes/Supplemental/Differentiation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
$<$<COMPILE_LANGUAGE:Swift>:-parse-stdlib>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
Expand Down
9 changes: 1 addition & 8 deletions Runtimes/Supplemental/Distributed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../cmake/modules"
"${CMAKE_SOURCE_DIR}/../../cmake/modules")

include(LanguageVersions)
include(SwiftProjectVersion)
project(SwiftDistributed
LANGUAGES C CXX Swift
Expand All @@ -22,17 +23,10 @@ if(NOT PROJECT_IS_TOP_LEVEL)
message(SEND_ERROR "Swift Distributed must build as a standalone project")
endif()

set(CMAKE_Swift_LANGUAGE_VERSION 5)

set(CMAKE_POSITION_INDEPENDENT_CODE YES)

set(CMAKE_C_VISIBILITY_PRESET "hidden")

set(CMAKE_CXX_EXTENSIONS NO)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_VISIBILITY_PRESET "hidden")

set(CMAKE_VISIBILITY_INLINES_HIDDEN YES)

set(${PROJECT_NAME}_SWIFTC_SOURCE_DIR
Expand Down Expand Up @@ -75,7 +69,6 @@ add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
$<$<COMPILE_LANGUAGE:Swift>:-strict-memory-safety>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SE427NoInferenceOnExtension>"
Expand Down
5 changes: 1 addition & 4 deletions Runtimes/Supplemental/Observation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../cmake/modules"
"${CMAKE_SOURCE_DIR}/../../cmake/modules")

include(LanguageVersions)
include(SwiftProjectVersion)
project(SwiftObservation
LANGUAGES Swift CXX
Expand All @@ -22,9 +23,6 @@ if(NOT PROJECT_IS_TOP_LEVEL)
message(SEND_ERROR "Swift Observation must build as a standalone project")
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)

set(${PROJECT_NAME}_SWIFTC_SOURCE_DIR
Expand Down Expand Up @@ -66,7 +64,6 @@ option(${PROJECT_NAME}_ENABLE_PRESPECIALIZATION "Enable generic metadata prespec
add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -enforce-exclusivity=unchecked>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -target-min-inlining-version -Xfrontend min>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-string-processing-module-import>"
Expand Down
2 changes: 1 addition & 1 deletion Runtimes/Supplemental/StringProcessing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../cmake/modules"
"${CMAKE_SOURCE_DIR}/../../cmake/modules")

include(LanguageVersions)
include(SwiftProjectVersion)
project(SwiftStringProcessing
LANGUAGES Swift C
Expand Down Expand Up @@ -52,7 +53,6 @@ option(${PROJECT_NAME}_ENABLE_PRESPECIALIZATION "Enable generic metadata prespec
add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-concurrency-module-import>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-string-processing-module-import>"
"$<$<COMPILE_LANGUAGE:Swift>:-warn-implicit-overrides>"
Expand Down
2 changes: 1 addition & 1 deletion Runtimes/Supplemental/Synchronization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../cmake/modules"
"${CMAKE_SOURCE_DIR}/../../cmake/modules")

include(LanguageVersions)
include(SwiftProjectVersion)
project(SwiftSynchronization
LANGUAGES Swift
Expand Down Expand Up @@ -71,7 +72,6 @@ add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
$<$<COMPILE_LANGUAGE:Swift>:-enable-builtin-module>
$<$<COMPILE_LANGUAGE:Swift>:-strict-memory-safety>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature NoncopyableGenerics2>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SuppressedAssociatedTypes>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature SE427NoInferenceOnExtension>"
Expand Down
2 changes: 1 addition & 1 deletion Runtimes/Supplemental/Volatile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/../cmake/modules"
"${CMAKE_SOURCE_DIR}/../../cmake/modules")

include(LanguageVersions)
include(SwiftProjectVersion)
project(SwiftVolatile
LANGUAGES Swift
Expand Down Expand Up @@ -66,7 +67,6 @@ add_compile_options(
$<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build>
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
$<$<COMPILE_LANGUAGE:Swift>:-strict-memory-safety>
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-swift-version 5>"
"$<$<AND:$<BOOL:${${PROJECT_NAME}_ENABLE_LIBRARY_EVOLUTION}>,$<COMPILE_LANGUAGE:Swift>>:-enable-library-evolution>"
"$<$<AND:$<BOOL:${${PROJECT_NAME}_ENABLE_PRESPECIALIZATION}>,$<COMPILE_LANGUAGE:Swift>>:SHELL:-Xfrontend -prespecialize-generic-metadata>")

Expand Down
5 changes: 5 additions & 0 deletions Runtimes/Supplemental/cmake/modules/LanguageVersions.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set(CMAKE_Swift_LANGUAGE_VERSION 5)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)