diff options
author | Gilles Khouzam <gillesk@microsoft.com> | 2015-09-23 21:27:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-02 13:43:24 (GMT) |
commit | b31ac171a4acdc8d8eb1d08c5b5f61ec90a9dbaa (patch) | |
tree | 231dbfbca2b43a245c3ce303c3f6909a984e9f3d /Modules/CMakeDetermineSystem.cmake | |
parent | 70688609412421c3efa168f9c210a9e4e06a5578 (diff) | |
download | CMake-b31ac171a4acdc8d8eb1d08c5b5f61ec90a9dbaa.zip CMake-b31ac171a4acdc8d8eb1d08c5b5f61ec90a9dbaa.tar.gz CMake-b31ac171a4acdc8d8eb1d08c5b5f61ec90a9dbaa.tar.bz2 |
Allow CMAKE_SYSTEM_VERSION to be set without CMAKE_SYSTEM_NAME
Teach CMakeDetermineSystem to check for a CMAKE_SYSTEM_VERSION setting
even when CMAKE_SYSTEM_NAME is not set. This will allow builds on the
host OS to target other versions of the OS without full cross-compiling.
Diffstat (limited to 'Modules/CMakeDetermineSystem.cmake')
-rw-r--r-- | Modules/CMakeDetermineSystem.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index fa14641..d9f7579 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -123,7 +123,9 @@ elseif(CMAKE_VS_WINCE_VERSION) set(PRESET_CMAKE_SYSTEM_NAME TRUE) else() set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}") - set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") + if(NOT DEFINED CMAKE_SYSTEM_VERSION) + set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") + endif() set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") set(CMAKE_CROSSCOMPILING FALSE) set(PRESET_CMAKE_SYSTEM_NAME FALSE) |