2.6.4. CLI: XcodeΒΆ
To build an Xcode project from the command line, xcodebuild
can be used.
Check it can be found:
> which xcodebuild
/usr/bin/xcodebuild
Go to the _builds
directory and run the build tool:
> cd _builds
[cgold-example/_builds]> xcodebuild
...
echo Build\ all\ projects
Build all projects
** BUILD SUCCEEDED **
But CMake offers a cross-tool way to do exactly the same by running cmake --build _builds
:
[cgold-example]> cmake --build _builds
...
echo Build\ all\ projects
Build all projects
** BUILD SUCCEEDED **
By default the Debug variant of foo
will be built, you can run it by:
[cgold-example]> ./_builds/Debug/foo
Hello from CGold!
Done!