CMAKE_TRY_COMPILE_CONFIGURATION default value
I was surprised to see that the default configuration used by try_compile was set to Debug despite my project setting up CMAKE_BUILD_TYPE to Release, so I had to write "set (CMAKE_TRY_COMPILE_CONFIGURATION ${CMAKE_BUILD_TYPE})" to avoid MSVC linking errors.
Here's a suggestion: If CMAKE_TRY_COMPILE_CONFIGURATION is not set, it could be set to the value of the project's CMAKE_BUILD_TYPE value.
What do you think ?