try_compile() support for an ENVIRONMENT option
Seeing the fix needed in !7153 (merged) makes me think perhaps try_compile()
should support an ENVIRONMENT
option where we could pass through environment variables. That would mean we wouldn't have to modify the environment in the main CMake process in order to set things like LANG=C
. This would also potentially be useful if we ever get to the point of being able to run multiple try_compile()
calls in parallel, since modifying the environment in that case would be a blocker.
It would need to support generator expressions so that $<SEMICOLON>
could be used.