CMake: fix MSYSTEM check CMake error

This commit is contained in:
Syping 2024-03-06 16:30:27 +01:00
parent 67b4b73400
commit d0139afd26

View file

@ -22,7 +22,7 @@ endif()
if (DEFINED CMAKE_C_COMPILER)
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
list(APPEND CMAKE_PASSTHROUGH_ENV "CC=${CMAKE_C_COMPILER}")
elseif ($ENV{MSYSTEM} STREQUAL "CLANG64")
elseif ("$ENV{MSYSTEM}" STREQUAL "CLANG64")
list(APPEND CMAKE_PASSTHROUGH_ENV "CC=clang")
endif()
if (DEFINED CMAKE_C_COMPILER_TARGET)
@ -31,7 +31,7 @@ endif()
if (DEFINED CMAKE_CXX_COMPILER)
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
list(APPEND CMAKE_PASSTHROUGH_ENV "CXX=${CMAKE_CXX_COMPILER}")
elseif ($ENV{MSYSTEM} STREQUAL "CLANG64")
elseif ("$ENV{MSYSTEM}" STREQUAL "CLANG64")
list(APPEND CMAKE_PASSTHROUGH_ENV "CXX=clang++")
endif()
if (DEFINED CMAKE_CXX_COMPILER_TARGET)