rm -r build
cmake -B build
And all is well.
Hi, thanks for the reply. I’m not too familiar with cmake and only really use it to compile code that uses cmake files (I did not write them). I uninstalled cmake with homebrew and tried to build from scratch and I’ve got up to make install but now it’s requesting a password and administrative privileges so I’m not really sure what’s going on. Do you perhaps know what the equivalent of this fix is for cmake installed with homebrew?
I tried this and got the following output:
cmake CMakeLists.txt
– 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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/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: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Configuring done (23.0s)
– Generating done (0.0s)
– Build files have been written to: /Users/alexgavin/software/cmake/test
Thanks for everyone’s suggestions. After hours searching Google somebody recommended trying the command:
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
It seemed to fix things (I think the SDK path was wrong?) although I’m getting some deprecation errors, but at least it works!