CMake Error: Could not create named generator XCode

亡梦爱人 提交于 2021-01-26 21:39:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!