Ah maybe the xcode UI is a bit more lenient. I'm just using the xcode generator to build the equivalent of the makefiles, rather than using the xcode ui, and am using vscode to front-end it all. So its perfectly possible that the gui version of xcode itself can ignore the error messages. FWIW I'm using vscode as we also do a lot of remote development, with the remote machines predominantly being Linux. Sadly vscode concludes that the project can't be compiled if the 'generation' phase fails in any...
After a bit of trial and error I found that if, in the tests/CMakeLists.txt file, you comment out the use of the axPlugin subdirectory: #add_subdirectory(axPlugin) the Xcode generator seems happy. No idea why it disliked that directory, maybe some bug later versions of Xcode have fixed but the file was exploiting.
I have the same problem, and sadly don't have an answer. However even though I get that error I do seem to be able to compile the library (so doing "cmake --build ." does seem to work. So from the command line thats fine, most IDEs won't let me plough on and compile if the cmake generator failed sadly.