Reputation: 1792
I am trying to generate an Xcode project from a cmake folder, using this very good answer. When executing this command:
cmake -G Xcode <dir of CMakeLists.txt>
I get:
CMake Error in CMakeLists.txt:
The custom command generating
/Users/fofo/Developer/ClientProject/desktop/always_build
is attached to multiple targets:
rake-all
stage
but none of these is a common dependency of the other(s). This is not
allowed by the Xcode "new build system".
CMake Generate step failed. Build files cannot be regenerated correctly.
Can I somehow specify to cmake -G Xcode <dir of CMakeLists.txt>
to use the old Xcode build system, or can I somehow solve the problem changing the cmake files?
Upvotes: 10
Views: 5193
Reputation: 1
This fix still works in XCode 14.3.1 so I'm not sure when they'll drop support for the old build system...
Upvotes: 0
Reputation: 1792
I have found the answer here. It is possible to use the legacy build system using:
cmake -G Xcode -T buildsystem=1 .
Upvotes: 18