mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
CMakeDetermineSystem: Clarify comment when CMAKE_SYSTEM_NAME is already set
This commit is contained in:
@@ -177,11 +177,9 @@ if(CMAKE_TOOLCHAIN_FILE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file
|
||||
# or it was set via -DCMAKE_SYSTEM_NAME=...
|
||||
# if that's the case, assume we are crosscompiling
|
||||
if(CMAKE_SYSTEM_NAME)
|
||||
# CMAKE_SYSTEM_NAME was set by a toolchain file or on the command line.
|
||||
# Assume it set CMAKE_SYSTEM_VERSION and CMAKE_SYSTEM_PROCESSOR too.
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
endif()
|
||||
@@ -193,6 +191,7 @@ elseif(CMAKE_VS_WINCE_VERSION)
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
set(PRESET_CMAKE_SYSTEM_NAME TRUE)
|
||||
else()
|
||||
# Build for the host platform and architecture by default.
|
||||
set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}")
|
||||
if(NOT DEFINED CMAKE_SYSTEM_VERSION)
|
||||
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
|
||||
|
||||
Reference in New Issue
Block a user