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 to use the old Xcode build system, or can I somehow solve the problem changing the cmake files ? Any help is greatly appreciated. Thanks
Xcode 10 uses a new build system. The new build system provides improved reliability and build performance, and it catches project configuration problems that the legacy build system does not.
I have found the answer here. It is possible to use the legacy build system using:
cmake -G Xcode -T buildsystem=1 .
Thanks a lot for your attention.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With