_CURRENT_OSX_VERSION should be settable from command line
Cross-compiling from linux to apple, in the current form, requires a little workaround: Modules/Platform/Darwin-Initialize.cmake
executes sw_vers
to query the MacOS version used for compiling. That tool is not present on linux systems, of course. This causes some problems as some checks compare the returned value to decide if e.g. the OS knows @rpath.
This can be worked around easily by putting a 'sw_vers'-script that just echoes a high-enough version in PATH.
It would be nicer, though, if a version to be assumed could be passed by command line, by e.g. something like cmake -DCMAKE_OSX_VERSION_OVERRIDE=10.15
I would be willing to work on this, but would like to first hear opinions on the naming on the variable.
e.g. OSX_VERSION_OVERRIDE
could be mistaken as defining the target system version