Skip to content

[cmake] add Synchronization specific cache files #81618

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justice-adams-apple
Copy link
Contributor

Add the cache files relevant for building the Synchronization supplemental library

@justice-adams-apple
Copy link
Contributor Author

@swift-ci please smoke test

endif()

if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to make this an error instead of just a warning.

Suggested change
message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")

@@ -0,0 +1,106 @@
# Toolchain configuration when compiling for Darwin Platforms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can likely share the toolchain file since it's only setting up the compilers and such that are used while compiling.
I don't think that this is setting anything specific to the Synchronization library. It's just the cache files that are setting project-specific options.

Maybe stick it in Runtimes/Supplemental/cmake/toolchains/Vendors/Apple/Darwin.toolchain.cmake?

@compnerd, do you have any opinions on the file layout for the toolchain files?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I am left wondering why are the caches in Runtimes/Supplemental/cmake/toolchains/Vendors/Apple rather than say Runtimes/cmake/caches/ and Runtimes/cmake/toolchains/.

endif()

if(NOT DEFINED SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET)
message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make this an error?

Suggested change
message(WARNING "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")
message(SEND_ERROR "SwiftSynchronization_TARGET_VARIANT_DEPLOYMENT_TARGET not defined")

@@ -0,0 +1,106 @@
# Toolchain configuration when compiling for Darwin Platforms
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I am left wondering why are the caches in Runtimes/Supplemental/cmake/toolchains/Vendors/Apple rather than say Runtimes/cmake/caches/ and Runtimes/cmake/toolchains/.


if(NOT CMAKE_OSX_SYSROOT)
if(NOT DEFINED ENV{SDKROOT})
message(FATAL_ERROR "The 'SDKROOT' environment variable is not set")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message(FATAL_ERROR "The 'SDKROOT' environment variable is not set")
message(FATAL_ERROR "`CMAKE_OSX_SYSROOT` and the 'SDKROOT' environment variable are not set")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants