Skip to content

shared: add CMake based build rules for ICU #58546

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

Closed
wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Apr 29, 2022

This adds a CMake based build for ICU. This is motivated by Windows
where we can avoid having to install a large number of tools in order to
build ICU by rewriting the build system in CMake.

This is a stopgap solution to the fact that ICU does not a CMake based
build. The project has been trying to switch to a CMake based for
nearly 4 years now [1].

This allows building ICU on Windows without having to setup and
configure cygwin to get access to autotools and without having to do
stage and coordinate the data build and the MSVC build. This also
allows the use of ninja to build which speeds up the build of ICU, as
well as enables easy cross-compilation. Additionally, this allows for a
more homogeneous build of Swift as nearly every other project builds
with CMake. There are a number of other parallel attempts to add an
out-of-tree CMake based system (e.g. [2]). This is a fairly common
problem but this solution is far more simple as it only provides enough
support to deal with the immediate needs of the Swift project. It only
supports building the bits of ICU that are needed for the Swift project
and tries to hardcode as much of the configuration as possible to reduce
the size of the ICU build while retaining all functionality required for
the Swift use cases.

[1] https://unicode-org.atlassian.net/browse/ICU-7747
[2] https://github.com/LibCMaker/ICU_CMake_Files

This adds a CMake based build for ICU. This is motivated by Windows
where we can avoid having to install a large number of tools in order to
build ICU by rewriting the build system in CMake.

This is a stopgap solution to the fact that ICU does not a CMake based
build. The project has been trying to switch to a CMake based for
nearly 4 years now [1].

This allows building ICU on Windows without having to setup and
configure cygwin to get access to autotools and without having to do
stage and coordinate the data build and the MSVC build. This also
allows the use of ninja to build which speeds up the build of ICU, as
well as enables easy cross-compilation. Additionally, this allows for a
more homogeneous build of Swift as nearly every other project builds
with CMake. There are a number of other parallel attempts to add an
out-of-tree CMake based system (e.g. [2]). This is a fairly common
problem but this solution is far more simple as it only provides enough
support to deal with the immediate needs of the Swift project. It only
supports building the bits of ICU that are needed for the Swift project
and tries to hardcode as much of the configuration as possible to reduce
the size of the ICU build while retaining all functionality required for
the Swift use cases.

[1] https://unicode-org.atlassian.net/browse/ICU-7747
[2] https://github.com/LibCMaker/ICU_CMake_Files
@compnerd
Copy link
Member Author

@swift-ci please smoke test

@compnerd
Copy link
Member Author

CC: @gottesmm @shahmishal

@compnerd
Copy link
Member Author

@swift-ci please test Windows platform

@compnerd
Copy link
Member Author

This is available in swift-installer-scripts, this can be closed.

@compnerd compnerd closed this May 21, 2022
@compnerd compnerd deleted the icu branch May 21, 2022 19:18
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.

1 participant