try_compile: Add keyword-dispatched signature
Introduce a new signature for try_compile (and try_run) which uses a unique temporary directory for output. This ensures that successive runs do not overwrite previous runs, which will simplify debugging and should also, eventually, allow us to execute multiple trials in parallel.
Notes:
- This adds
MakeTempDirectoryto kwsys. This may need to be implemented on exotic platforms. The POSIX implementation
This is functional and "mostly" implemented, but still needs some work:
-
Implement the new signature. -
Use unique directories for each invocation. -
Update try_compiledocumentation. -
Update try_rundocumentation. -
Remove CMakeScratchat the beginning of a CMake run. -
Remove temporary directory, not just contents. -
Verify that --debug-trycompiledoesn't remove anything.
-
-
Finish updating tests.
Issue: #22799 (closed)
Edited by Brad King