He instalado gcc y g++ en lugar de los compiladores clang de Xcode, por lo que ahora tengo problemas con la compilación con cmake. Después de ejecutar cmake tengo error:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/Cellar/cmake/3.15.3/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message):
The C compiler
"/usr/bin/gcc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/yuriy/Projects/SublimeProjects/AgingAlgorithm/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_d5a2e/fast && xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/yuriy/Projects/SublimeProjects/AgingAlgorithm/build/CMakeFiles/CMakeOutput.log".
See also "/Users/yuriy/Projects/SublimeProjects/AgingAlgorithm/build/CMakeFiles/CMakeError.log".
El problema ha aparecido después de borrar los compiladores clang y Xcode y cambiar los enlaces cc, c++, gcc y g++. En el terminal MacOS puede ejecutar las utilidades gcc, cc, g++, c++, pero todavía no funciona para cmake.
¿Puedo solucionarlo sin instalar los compiladores básicos de clang desde Xcode? Si puedo, ¿cómo?