# CMake Error: "...No CMAKE\_CXX\_COMPILER could be found..."

**URL:** https://discourse.cmake.org/t/cmake-error-no-cmake-cxx-compiler-could-be-found/10016
**Category:** Usage
**Tags:** os:macos, gen:xcode
**Created:** [February 6, 2024, 9:19pm UTC](https://discourse.cmake.org/t/cmake-error-no-cmake-cxx-compiler-could-be-found/10016 "2024-02-06T21:19:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Garrett](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/3e96dc/32.png) [@Garrett](https://discourse.cmake.org/u/Garrett)
#### Post date: [February 6, 2024, 9:19pm UTC](https://discourse.cmake.org/t/cmake-error-no-cmake-cxx-compiler-could-be-found/10016/1 "2024-02-06T21:19:42Z")

</div>

Greetings!

TLDR: error while trying to generate Xcode project from: [FFTease3.0-MaxMSP/BUILDME.md at master · ericlyon/FFTease3.0-MaxMSP · GitHub](https://github.com/ericlyon/FFTease3.0-MaxMSP/blob/master/BUILDME.md)

First post, complete noob. Not a coder; just a determined musician trying to use a maxforlive device that isn’t compiled for MacOS…and I know just enough about programming in Max to get myself into trouble. I’ve figured out how to follow steps 1-4 on the /BUILDME.md using Terminal, but when I try to actually generate (step 5) it gives a variety of errors.

```auto
Last login: Tue Feb 6 15:58:44 on ttys001
gworks@gworks ~ % cd "/Users/gworks/Documents/Max 8/Packages/"                
gworks@gworks Packages % mkdir build
gworks@gworks Packages % cd build
gworks@gworks build % cmake --help
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory. Specify an existing build directory to
re-generate its build system.

Options
  -S <path-to-source> = Explicitly specify a source directory.
  -B <path-to-build> = Explicitly specify a build directory.
  -C <initial-cache> = Pre-load a script to populate the cache.
  -D <var>[:<type>]=<value> = Create or update a cmake cache entry.
  -U <globbing_expr> = Remove matching entries from CMake cache.
  -G <generator-name> = Specify a build system generator.
  -T <toolset-name> = Specify toolset name if supported by
                                 generator.
  -A <platform-name> = Specify platform name if supported by
                                 generator.
  --toolchain <file> = Specify toolchain file
                                 [CMAKE_TOOLCHAIN_FILE].
  --install-prefix <directory> = Specify install directory
                                 [CMAKE_INSTALL_PREFIX].
  -Wdev = Enable developer warnings.
  -Wno-dev = Suppress developer warnings.
  -Werror=dev = Make developer warnings errors.
  -Wno-error=dev = Make developer warnings not errors.
  -Wdeprecated = Enable deprecation warnings.
  -Wno-deprecated = Suppress deprecation warnings.
  -Werror=deprecated = Make deprecated macro and function warnings
                                 errors.
  -Wno-error=deprecated = Make deprecated macro and function warnings
                                 not errors.
  --preset <preset>,--preset=<preset>
                               = Specify a configure preset.
  --list-presets[=<type>] = List available presets.
  -E = CMake command mode.
  -L[A][H] = List non-advanced cached variables.
  --fresh = Configure a fresh build tree, removing any
                                 existing cache file.
  --build <dir> = Build a CMake-generated project binary tree.
  --install <dir> = Install a CMake-generated project binary
                                 tree.
  --open <dir> = Open generated project in the associated
                                 application.
  -N = View mode only.
  -P <file> = Process script mode.
  --find-package = Legacy pkg-config like mode. Do not use.
  --graphviz=<file> = Generate graphviz of dependencies, see
                                 CMakeGraphVizOptions.cmake for more.
  --system-information [file] = Dump information about this system.
  --log-level=<ERROR|WARNING|NOTICE|STATUS|VERBOSE|DEBUG|TRACE>
                               = Set the verbosity of messages from CMake
                                 files. --loglevel is also accepted for
                                 backward compatibility reasons.
  --log-context = Prepend log messages with context, if given
  --debug-trycompile = Do not delete the try_compile build tree.
                                 Only useful on one try_compile at a time.
  --debug-output = Put cmake in a debug mode.
  --debug-find = Put cmake find in a debug mode.
  --debug-find-pkg=<pkg-name>[,...]
                               = Limit cmake debug-find to the
                                 comma-separated list of packages
  --debug-find-var=<var-name>[,...]
                               = Limit cmake debug-find to the
                                 comma-separated list of result variables
  --trace = Put cmake in trace mode.
  --trace-expand = Put cmake in trace mode with variable
                                 expansion.
  --trace-format=<human|json-v1>
                               = Set the output format of the trace.
  --trace-source=<file> = Trace only this CMake file/module. Multiple
                                 options allowed.
  --trace-redirect=<file> = Redirect trace output to a file instead of
                                 stderr.
  --warn-uninitialized = Warn about uninitialized values.
  --no-warn-unused-cli = Don't warn about command line options.
  --check-system-vars = Find problems with variable usage in system
                                 files.
  --compile-no-warning-as-error= Ignore COMPILE_WARNING_AS_ERROR property and
                                 CMAKE_COMPILE_WARNING_AS_ERROR variable.
  --profiling-format=<fmt> = Output data for profiling CMake scripts.
                                 Supported formats: google-trace
  --profiling-output=<file> = Select an output path for the profiling data
                                 enabled through --profiling-format.
  -h,-H,--help,-help,-usage,/? = Print usage information and exit.
  --version,-version,/V [<file>]
                               = Print version number and exit.
  --help <keyword> [<file>] = Print help for one keyword and exit.
  --help-full [<file>] = Print all help manuals and exit.
  --help-manual <man> [<file>] = Print one help manual and exit.
  --help-manual-list [<file>] = List help manuals available and exit.
  --help-command <cmd> [<file>]= Print help for one command and exit.
  --help-command-list [<file>] = List commands with help available and exit.
  --help-commands [<file>] = Print cmake-commands manual and exit.
  --help-module <mod> [<file>] = Print help for one module and exit.
  --help-module-list [<file>] = List modules with help available and exit.
  --help-modules [<file>] = Print cmake-modules manual and exit.
  --help-policy <cmp> [<file>] = Print help for one policy and exit.
  --help-policy-list [<file>] = List policies with help available and exit.
  --help-policies [<file>] = Print cmake-policies manual and exit.
  --help-property <prop> [<file>]
                               = Print help for one property and exit.
  --help-property-list [<file>]= List properties with help available and
                                 exit.
  --help-properties [<file>] = Print cmake-properties manual and exit.
  --help-variable var [<file>] = Print help for one variable and exit.
  --help-variable-list [<file>]= List variables with help available and exit.
  --help-variables [<file>] = Print cmake-variables manual and exit.

Generators

The following generators are available on this platform (* marks default):
* Unix Makefiles = Generates standard UNIX makefiles.
  Ninja = Generates build.ninja files.
  Ninja Multi-Config = Generates build-<Config>.ninja files.
  Watcom WMake = Generates Watcom WMake makefiles.
  Xcode = Generate Xcode project files.
  CodeBlocks - Ninja = Generates CodeBlocks project files
                                 (deprecated).
  CodeBlocks - Unix Makefiles = Generates CodeBlocks project files
                                 (deprecated).
  CodeLite - Ninja = Generates CodeLite project files
                                 (deprecated).
  CodeLite - Unix Makefiles = Generates CodeLite project files
                                 (deprecated).
  Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files
                                 (deprecated).
  Eclipse CDT4 - Unix Makefiles= Generates Eclipse CDT 4.0 project files
                                 (deprecated).
  Kate - Ninja = Generates Kate project files (deprecated).
  Kate - Ninja Multi-Config = Generates Kate project files (deprecated).
  Kate - Unix Makefiles = Generates Kate project files (deprecated).
  Sublime Text 2 - Ninja = Generates Sublime Text 2 project files
                                 (deprecated).
  Sublime Text 2 - Unix Makefiles
                               = Generates Sublime Text 2 project files
                                 (deprecated).

gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % 
gworks@gworks build % cmake -G "Xcode" ..
CMake Warning:
  Ignoring extra path from command line:

   ".."

CMake Error: The source directory "/Users/gworks/Documents/Max 8/Packages" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
gworks@gworks build % cmake -S "/Users/gworks/Documents/Max 8/Packages/FFTease3.0-MaxMSP/source/projects/morphine~"
-- The C compiler identification is AppleClang 15.0.0.15000100
-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.4s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/gworks/Documents/Max 8/Packages/build
gworks@gworks build % cmake -G "Xcode" ..
CMake Warning:
  Ignoring extra path from command line:

   ".."

CMake Error: The source directory "/Users/gworks/Documents/Max 8/Packages" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
gworks@gworks build % 
gworks@gworks build % cmake -G "Xcode" "/Users/gworks/Documents/Max 8/Packages/FFTease3.0-MaxMSP/source/projects/morphine~"
CMake Error: Error: generator : Xcode
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.

\ I deleted those two items; see pics

gworks@gworks build % cmake -G "Xcode" "/Users/gworks/Documents/Max 8/Packages/FFTease3.0-MaxMSP/source/projects/morphine~"
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_C_COMPILER could be found.

CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_CXX_COMPILER could be found.

-- Configuring incomplete, errors occurred!
gworks@gworks build % 

```

Lost and would love to learn what’s going on here.  
thanks!  
Garrett

[Uploading: Initial file tree.jpg…]8053501607  
[Uploading: After Deleting file and directory.jpg…]8053501607

---

<div class="post-metadata">

### Author: ![Garrett](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/3e96dc/32.png) [@Garrett](https://discourse.cmake.org/u/Garrett)
#### Post date: [February 9, 2024, 6:15pm UTC](https://discourse.cmake.org/t/cmake-error-no-cmake-cxx-compiler-could-be-found/10016/2 "2024-02-09T18:15:32Z")

</div>

Just a li’ bump… (o:

---

<div class="post-metadata">

### Author: ![Garrett](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/g/3e96dc/32.png) [@Garrett](https://discourse.cmake.org/u/Garrett)
#### Post date: [February 11, 2024, 4:37pm UTC](https://discourse.cmake.org/t/cmake-error-no-cmake-cxx-compiler-could-be-found/10016/3 "2024-02-11T16:37:51Z")

</div>

For anyone who stumbles on this topic with the same question later, here’s the solution I was gifted on another forum:

The path to your build folder is supposed to be \<…\>/Max/Packages/FFTease3.0-MaxMSP/build/

So, between step 2 and 3, just do

```auto
cd FFTease3.0-MaxMSP

```

Hope this helps! (o:
