mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
OtherTests.cmake: check for cross-compile, not for toolchain
Build systems like vcpkg alway sets `CMAKE_TOOLCHAIN_FILE` so it should not be used as a sign that this is a cross-compile. Also indented the function correctly. Reported-by: Philip Chan Fixes #9921 Closes #9923
This commit is contained in:
parent
df00df1e60
commit
14d5589032
@ -85,7 +85,7 @@ endif()
|
||||
|
||||
unset(CMAKE_TRY_COMPILE_TARGET_TYPE)
|
||||
|
||||
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
|
||||
# only try this on non-apple platforms
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user