Documentation: check_compiler_flag() says it calls check_source_compiles(), but doesn't say it sets CMAKE_TRY_COMPILE_TARGET_TYPE to STATIC_LIBRARY
The generated test project that is used to verify that the compiler flags work / don't work compiles the code as a static library. This is surprising to me because
https://cmake.org/cmake/help/latest/module/CheckSourceCompiles.html
says
Check that the source supplied in <code> can be compiled as a source file for the requested language and linked as an executable (so it must contain at least a main() function)
So I was attempting to pass flags to check_compiler_flag()
that only do any good when building an executable.