MSVC Custom Toolchain: CMAKE_<LANG>_STANDARD_COMPUTED_DEFAULT

Currently in our MSVC toolchain we need to specify the following variables in our toolchain:

    if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "19.0")
        set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14"  CACHE INTERNAL "")
    endif()

    set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "90"  CACHE INTERNAL "")

Not specifying results in the project failing to configure:
"
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/Compiler/CMakeCommonCompilerMacros.cmake:42 (message):
CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for MSVC
(d:/foobar/win/vc/14.27.29110/bin/Hostx64/x64/cl.exe) version
19.27.29112
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.20/Modules/Compiler/MSVC-C.cmake:14 (__compiler_check_default_language_standard)
C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeCInformation.cmake:25 (include)
imported/pal/CMakeLists.txt:5 (project)
"

This isn’t ideal. Is there a way to avoid this?

I was specifying too much information in the toolchain like @brad.king said.

“At least CMAKE_LANG_COMPILER_ID, CMAKE_LANG_COMPILER_VERSION, CMAKE_LANG_ARCHITECTURE_ID, and CMAKE_LANG_STANDARD_COMPUTED_DEFAULT should all be computed by CMake automatically. By setting them in the toolchain file you may be messing with CMake’s internal logic and break other things.”

He was exactly right. Specifying too much stuff was causing problems leading me to specify even more stuff.

Currently here is all I need to specify for my ninja toolchain:

CMAKE_SYSTEM_NAME (If host doesn’t match target)
CMAKE_SYSTEM_VERSION
CMAKE_SYSTEM_PROCESSOR
CMAKE_C_COMPILER
CMAKE_CXX_COMPILER
CMAKE_RC_COMPILER
CMAKE_MT
CMAKE_*_LINKER_FLAGS_INIT
    EXE SHARED STATIC MODULE
CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES