make test errors after build on Mac
Hello, I built cmake on a Mac (Mojave/10.14;Xcode 11.4.1) as part of the development environment I am building and got 6 failures during "make test". To simplify I am grouping into issues I think related and share what will like be three issues total one at a time.
The first relates to failures that come up in "Architecture" and "BuildDepends" tests from an assumption that the Xcode GUI is installed and therefore "xcodebuild" works. If only the command line tools are installed, xcodebuild fails with: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
In the context this seems like a heavyweight assumption since it is only being used to determine if Xcode V.3 versus V.4+ is installed and then only to determine whether the host supports targeting ppc, i386, and/or x86_64. I would offer alternate code for both tests but not sure which way you want to go.
Does Cmake V.3.28+ support host platforms running Xcode 4 (circa 2011-2013, likely Mac OS X Snow Leopard or maybe Lion) or even Xcode 3 (circa 2007-2011, likely Snow Leopard)? If no to Xcode 3, then seems like testing for it as a way to see if ppc is an available target is a moot point. Otherwise if assuming Mac OS X 10.10 or later as a minimum host platform, one can assume Xcode 6 tools and options are available. Or depending on the goals here, perhaps better to just build tests programs for different targets to see which work/error rather than trying to track which version of Xcode does what or even that the user is using Apple tools rather than GCC or LLVM?
Either way, I also think now would be time to update these tests to consider host platform that target arm64 as well as x86_64.