From ae991ee6ca224b2674aa24c7c705b5c36dcbb361 Mon Sep 17 00:00:00 2001 From: Sam Freed Date: Wed, 6 Feb 2019 13:08:57 -0800 Subject: [PATCH] Warn when unable to determine target architecture instead of error (#5188) * Warn when unable to determine target architecture instead of error * Make the warning not appear multiple times * fix multiple warnings for real --- scripts/buildsystems/vcpkg.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake index 91c196fb9..4ffb123d4 100644 --- a/scripts/buildsystems/vcpkg.cmake +++ b/scripts/buildsystems/vcpkg.cmake @@ -50,7 +50,13 @@ else() elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") set(_VCPKG_TARGET_TRIPLET_ARCH x64) else() - message(FATAL_ERROR "Unable to determine target architecture.") + if( _CMAKE_IN_TRY_COMPILE ) + message(STATUS "Unable to determine target architecture, continuing without vcpkg.") + else() + message(WARNING "Unable to determine target architecture, continuing without vcpkg.") + endif() + set(VCPKG_TOOLCHAIN ON) + return() endif() endif() endif()