2c18367d68
- Use add_compile_options() in CMake to avoid duplicate lines. - Add missing includes as needed for Linux compilation. - Add required macro to access ftruncate() on Linux in C99 mode. - Switch to C++11 random numbers instead of arc4random for portability. - Workaround GCC issue with references to packed struct fields. - Fix missing default case required by GCC. |
||
---|---|---|
Libraries | ||
ThirdParty | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
LICENSE | ||
Makefile | ||
PATENTS | ||
README.md |
xcbuild
xcbuild is an Xcode-compatible build tool with the goal of providing faster builds, better documentation of the build process and running on multiple platforms (in particular OS X and Linux)
Why xcbuild?
Features | Performance | ||||
---|---|---|---|---|---|
🚀 | Blazing fast incremental builds | xcodebuild | xcbuild + Ninja | ||
📖 | Documents the Xcode build process | ||||
🔗 | Builds Xcode projects and workspaces | ||||
🐣 | Supports Swift apps and frameworks | Clean Build | 30.103s | 25.122s | |
✨ | Tools and libraries for Xcode projects | ||||
💝 | Fully compatible with xcpretty | ||||
🎩 | Uses Ninja and llbuild | Incremental Build | 2.190s | 0.046s ⚡ | |
:octocat: | Open source under the BSD license | ||||
🐧 | Builds on Linux |
xcbuild and other build tools
xctool | Buck | xcpretty |
---|---|---|
xcbuild and xctool are both Xcode-compatible build systems. We plan on slowly deprecating xctool's build support but keep it as a great way to run tests. | Facebook's main build system is Buck. Buck has a stronger architecture and advanced features like artifact caching while having a much simpler build format. If you have a new project, it's highly recommended. | xcbuild works great with xcpretty. Pipe the output from xcbuild to xcpretty the same way as you would from xcodebuild . |
Building
- Xcode 7 or later, on OS X.
- GCC 5 or later, on Linux.
libxml2-dev
is also required. - CMake and Ninja (or llbuild).
- With Homebrew:
brew install cmake ninja
- With Homebrew:
git clone https://github.com/facebook/xcbuild
cd xcbuild
git submodule update --init
make
Build output will be in the build
directory. Run xcbuild with ./build/xcbuild
.
Usage
The command line options are compatible with xcodebuild.
xcbuild -workspace Example.xcworkspace -scheme Example
Using Ninja (or llbuild)
To switch to the significantly faster Ninja executor:
xcbuild -executor ninja [-workspace Example.xcworkspace ...]
Besides the -executor ninja
parameters, the options are otherwise identical. The Ninja executor is fastest if it can avoid re-generating the Ninja files if the build configuration and input project files do not change.
Contributing
xcbuild actively welcomes contributions from the community. If you're interested in contributing, be sure to check out the contributing guide. It includes some tips for getting started in the codebase, as well as important information about the code of conduct, license, and CLA.
Thanks
xcbuild is built on build system documentation from the community. In particular, thanks to these people for their writing:
Third-party licenses are listed in the LICENSE
document.