Rewrite the documentation using better reStructuredText markup constructs. Clarify interaction of options like LINK_LIBRARIES and CMAKE_FLAGS.
Most functionality is already implemented in Source/cmCoreTryCompile.{h,cxx}. Document and improve argument parsing. This functionality is already being used by a number of modules, like CheckCSourceCompiles.cmake, but it is not documented.
Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.