diff options
author | Brad King <brad.king@kitware.com> | 2021-01-26 14:03:03 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-01-26 14:03:13 (GMT) |
commit | 9792c7df4ef361388ab1f47ba50674245aa8e95a (patch) | |
tree | a06d55cc911dd7c01eaf9216bbf10f756583ea4d | |
parent | 5d31e7a25d4b1ebdf0137377d5668337b7e03b5b (diff) | |
parent | 9c5cf0c1af93216f09c5c6bbf543a5f0bcea0dac (diff) | |
download | CMake-9792c7df4ef361388ab1f47ba50674245aa8e95a.zip CMake-9792c7df4ef361388ab1f47ba50674245aa8e95a.tar.gz CMake-9792c7df4ef361388ab1f47ba50674245aa8e95a.tar.bz2 |
Merge topic 'irsl-msvc-arm64'
9c5cf0c1af IRSL: Add support for non-x86/x64 architectures such as arm64
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5733
-rw-r--r-- | Modules/InstallRequiredSystemLibraries.cmake | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 6ecdb9c..a39393dc 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -101,16 +101,18 @@ endforeach() if(MSVC) file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT) - if(CMAKE_CL_64) - if(MSVC_VERSION GREATER 1599) - # VS 10 and later: - set(CMAKE_MSVC_ARCH x64) - else() + if(MSVC_C_ARCHITECTURE_ID) + string(TOLOWER "${MSVC_C_ARCHITECTURE_ID}" CMAKE_MSVC_ARCH) + elseif(MSVC_CXX_ARCHITECTURE_ID) + string(TOLOWER "${MSVC_CXX_ARCHITECTURE_ID}" CMAKE_MSVC_ARCH) + else() + set(CMAKE_MSVC_ARCH x86) + endif() + if(CMAKE_MSVC_ARCH STREQUAL "x64") + if(MSVC_VERSION LESS 1600) # VS 9 and earlier: set(CMAKE_MSVC_ARCH amd64) endif() - else() - set(CMAKE_MSVC_ARCH x86) endif() get_filename_component(devenv_dir "${CMAKE_MAKE_PROGRAM}" PATH) |