I have installed gcc and g++ instead of clang compilers from Xcode, so now I have problem with compiling with cmake. After running cmake I have got 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".
Problem have been appeared after deleting clang compilers and Xcode and changing links cc, c++, gcc and g++. In terminal macOS can run utilities gcc, cc, g++, c++, but it still doesn't work for cmake.
Can I fix it without installation of basic clang compilers from Xcode? If I can, so how?