13

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.
trojanfoe
  • 120,358
  • 21
  • 212
  • 242
4ntoine
  • 19,816
  • 21
  • 96
  • 220

2 Answers2

13

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.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
1

I also met this problem, it was resolved after I renamed Xcode-beta to Xcode

andrewchan2022
  • 4,953
  • 45
  • 48
  • You don't need to rename the Applications you simply need to use `xcode-select -switch /path/to/Xcode/`. You can install and use as many Xcode applications as you like, however when it comes to the command line you need to tell it the **one** to use, which is where `xcode-select` comes in. – trojanfoe Jan 27 '20 at 09:57