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
This commit is contained in:
Sam Freed 2019-02-06 13:08:57 -08:00 committed by Robert Schumacher
parent 62f294eeae
commit ae991ee6ca

View File

@ -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()