
#set(dir "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64")
#
#set(CMAKE_CXX_COMPILER "${dir}/cl.exe")
#set(CMAKE_C_COMPILER "${dir}/cl.exe")

#get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY)
#
#set(CMAKE_LINKER "${_compiler_dir}/link.bat")


#if(CMAKE_HOST_WIN32 AND CMAKE_GENERATOR MATCHES "Ninja")
#
#
#    message(STATUS "CMAKE_GENERATOR           = ${CMAKE_GENERATOR}")
#    message(STATUS "CMAKE_GENERATOR_INSTANCE  = ${CMAKE_GENERATOR_INSTANCE}")
#    message(STATUS "CMAKE_GENERATOR_TOOLSET   = ${CMAKE_GENERATOR_TOOLSET}")
#    message(STATUS "CMAKE_GENERATOR_PLATFORM  = ${CMAKE_GENERATOR_PLATFORM}")
#    message(STATUS "CMAKE_MAKE_PROGRAM before = ${CMAKE_MAKE_PROGRAM}")
#
#    file(GLOB CLION_NINJA_CANDIDATES
#            "C:/Program Files/JetBrains/CLion */bin/ninja/win/x64/ninja.exe"
#    )
#
#    list(SORT CLION_NINJA_CANDIDATES ORDER DESCENDING)
#
#    if(CLION_NINJA_CANDIDATES)
#        list(GET CLION_NINJA_CANDIDATES 0 CLION_NINJA_EXE)
#        message(STATUS "CLION_NINJA_EXE = ${CLION_NINJA_EXE}")
#
#        set(CMAKE_MAKE_PROGRAM "${CLION_NINJA_EXE}" CACHE FILEPATH "Ninja executable" FORCE)
#    else()
#        message(WARNING "CLion ninja.exe not found")
#    endif()
#
#    message(STATUS "CMAKE_MAKE_PROGRAM after  = ${CMAKE_MAKE_PROGRAM}")
#
#    # 输出 Ninja 版本
#    execute_process(
#            COMMAND "${CMAKE_MAKE_PROGRAM}" --version
#            OUTPUT_VARIABLE _ninja_version
#            ERROR_VARIABLE  _ninja_version_err
#            RESULT_VARIABLE _ninja_version_ret
#            OUTPUT_STRIP_TRAILING_WHITESPACE
#            ERROR_STRIP_TRAILING_WHITESPACE
#    )
#
#    message(STATUS "Ninja version ret = ${_ninja_version_ret}")
#    message(STATUS "Ninja version     = ${_ninja_version}")
#    if(_ninja_version_err)
#        message(STATUS "Ninja version err = ${_ninja_version_err}")
#    endif()
#
#    # 输出 Ninja Windows 编码模式
#    execute_process(
#            COMMAND "${CMAKE_MAKE_PROGRAM}" -t wincodepage
#            OUTPUT_VARIABLE _ninja_wincodepage
#            ERROR_VARIABLE  _ninja_wincodepage_err
#            RESULT_VARIABLE _ninja_wincodepage_ret
#            OUTPUT_STRIP_TRAILING_WHITESPACE
#            ERROR_STRIP_TRAILING_WHITESPACE
#    )
#
#    message(STATUS "Ninja wincodepage ret = ${_ninja_wincodepage_ret}")
#    message(STATUS "Ninja wincodepage     = ${_ninja_wincodepage}")
#    if(_ninja_wincodepage_err)
#        message(STATUS "Ninja wincodepage err = ${_ninja_wincodepage_err}")
#    endif()
#
#    # 输出当前 cmd 代码页
#    execute_process(
#            COMMAND cmd /c chcp
#            OUTPUT_VARIABLE _cmd_chcp
#            ERROR_VARIABLE  _cmd_chcp_err
#            RESULT_VARIABLE _cmd_chcp_ret
#            OUTPUT_STRIP_TRAILING_WHITESPACE
#            ERROR_STRIP_TRAILING_WHITESPACE
#    )
#
#    message(STATUS "cmd chcp ret = ${_cmd_chcp_ret}")
#    message(STATUS "cmd chcp     = ${_cmd_chcp}")
#    if(_cmd_chcp_err)
#        message(STATUS "cmd chcp err = ${_cmd_chcp_err}")
#    endif()
#endif()



