cmake执行命令遇到错误,如下
根据提示查看CMakeError.log文件:
xcodebuild -target "GHUnitIOS (Device)" -configuration Release SYMROOT=build
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
make: *** [default] Error 1
原因是Xcode重命名后,xcodebuild找不到原来的Xcode了。
解决方法:在终端输入命令
xcode-select -switch 新的xcode路径
sudo xcode-select --switch /Applications/Xcode.app/Contents/Contents/Developer/
问题解决