mirror of
https://github.com/Syping/dtranslatebot.git
synced 2024-11-22 22:00:24 +01:00
ArgumentPassthrough: avoid accidental Cross-Compiling + more fixes
This commit is contained in:
parent
024400be46
commit
dd2de72f94
1 changed files with 11 additions and 3 deletions
|
@ -22,6 +22,8 @@ endif()
|
||||||
if (DEFINED CMAKE_C_COMPILER)
|
if (DEFINED CMAKE_C_COMPILER)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ENV "CC=${CMAKE_C_COMPILER}")
|
list(APPEND CMAKE_PASSTHROUGH_ENV "CC=${CMAKE_C_COMPILER}")
|
||||||
|
elseif ($ENV{MSYSTEM} STREQUAL "CLANG64")
|
||||||
|
list(APPEND CMAKE_PASSTHROUGH_ENV "CC=clang")
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED CMAKE_C_COMPILER_TARGET)
|
if (DEFINED CMAKE_C_COMPILER_TARGET)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_C_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_C_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET}")
|
||||||
|
@ -32,16 +34,22 @@ endif()
|
||||||
if (DEFINED CMAKE_CXX_COMPILER_TARGET)
|
if (DEFINED CMAKE_CXX_COMPILER_TARGET)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_CXX_COMPILER_TARGET=${CMAKE_CXX_COMPILER_TARGET}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_CXX_COMPILER_TARGET=${CMAKE_CXX_COMPILER_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
if (DEFINED CMAKE_RC_COMPILER)
|
||||||
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_RC_COMPILER=${CMAKE_RC_COMPILER}")
|
||||||
|
endif()
|
||||||
|
if (DEFINED CMAKE_STRIP)
|
||||||
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_STRIP=${CMAKE_STRIP}")
|
||||||
|
endif()
|
||||||
if (DEFINED CMAKE_SYSROOT)
|
if (DEFINED CMAKE_SYSROOT)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSROOT=${CMAKE_SYSROOT}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSROOT=${CMAKE_SYSROOT}")
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED CMAKE_SYSTEM_NAME)
|
if (DEFINED CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}")
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED CMAKE_SYSTEM_PROCESSOR)
|
if (DEFINED CMAKE_SYSTEM_PROCESSOR AND NOT CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED CMAKE_SYSTEM_VERSION)
|
if (DEFINED CMAKE_SYSTEM_VERSION AND NOT CMAKE_SYTEM_VERSION STREQUAL CMAKE_HOST_SYSTEM_VERSION)
|
||||||
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}")
|
list(APPEND CMAKE_PASSTHROUGH_ARGS "-DCMAKE_SYSTEM_VERSION=${CMAKE_SYSTEM_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
if (DEFINED CMAKE_TOOLCHAIN_FILE)
|
if (DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||||
|
|
Loading…
Reference in a new issue