try_compile: Add SOURCE_FROM_{ARG,VAR,FILE}

Merged Matthew Woehlke requested to merge matthew-woehlke/cmake:try_compile-source-from into master

Add ability to "feed" try_compile (and try_run) sources more directly, either from literal content, or from a CMake variable which contains literal content, or from a file. This saves the user from needing a separate step to write the content to a file, and allows for the sources to only exist in the scratch directory.

Issue: #22799 (closed)

Edited by Brad King

Merge request reports