diff options
author | Brad King <brad.king@kitware.com> | 2024-01-30 17:13:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-30 17:25:44 (GMT) |
commit | 0b181cec03a17b4f8427cd2e4a387812332161d7 (patch) | |
tree | 1fbd4ecf5594b2b7972060c4bf2ee127395d4d20 | |
parent | 84dd192326d8df4b3c0bc6aa14980a52e7ca36a5 (diff) | |
download | CMake-0b181cec03a17b4f8427cd2e4a387812332161d7.zip CMake-0b181cec03a17b4f8427cd2e4a387812332161d7.tar.gz CMake-0b181cec03a17b4f8427cd2e4a387812332161d7.tar.bz2 |
CMakeDetermineSystem: Clarify comment when CMAKE_SYSTEM_NAME is already set
-rw-r--r-- | Modules/CMakeDetermineSystem.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index fff4e9d..f338aac 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -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}") |