问题
i have checked out llvm/clang/compiler-rt sources from official git repositories, but i'm having:
MBA-Anton:llvm_34_xcode_build asmirnov$ cmake -G XCode ../llvm_34
CMake Error: Could not create named generator XCode
LLVM sources:
MBA-Anton:llvm_34_xcode_build asmirnov$ ls ../llvm_34
CMakeLists.txt Makefile.common cmake llvm.spec.in
CODE_OWNERS.TXT Makefile.config.in configure projects
CREDITS.TXT Makefile.rules docs test
LICENSE.TXT README.txt examples tools
LLVMBuild.txt autoconf include unittests
Makefile bindings lib utils
Cmake version:
MBA-Anton:llvm_34_xcode_build asmirnov$ cmake -version
cmake version 2.8.11.1
Xcode generator should be supported for this cmake version according to doc and output:
MBA-Anton:llvm_34_xcode_build asmirnov$ cmake --help
...
Generators
The following generators are available on this platform:
Unix Makefiles = Generates standard UNIX makefiles.
Ninja = Generates build.ninja files (experimental).
Xcode = Generate Xcode project files.
CodeBlocks - Ninja = Generates CodeBlocks project files.
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files.
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files.
Eclipse CDT4 - Unix Makefiles
= Generates Eclipse CDT 4.0 project files.
KDevelop3 = Generates KDevelop 3 project files.
KDevelop3 - Unix Makefiles = Generates KDevelop 3 project files.
Sublime Text 2 - Ninja = Generates Sublime Text 2 project files.
Sublime Text 2 - Unix Makefiles
= Generates Sublime Text 2 project files.
回答1:
I've never used CMake, but from what I've seen from your question it's just a question of case-sensitivity.
The generator is called Xcode
and not XCode
.
回答2:
I also met this problem, it was resolved after I renamed Xcode-beta to Xcode
来源:https://stackoverflow.com/questions/24278599/cmake-error-could-not-create-named-generator-xcode