From 7edb3b61cf49f0d60f6d2f843b61064b6dcc1cc1 Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Wed, 16 Sep 2020 16:19:52 -0700 Subject: [PATCH] [BUILD] enhance build script for optional vta dep (#6497) --- cmake/modules/VTA.cmake | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmake/modules/VTA.cmake b/cmake/modules/VTA.cmake index 0117857783db..fd3a121ef795 100644 --- a/cmake/modules/VTA.cmake +++ b/cmake/modules/VTA.cmake @@ -25,11 +25,14 @@ else() set(VTA_HW_PATH $ENV{VTA_HW_PATH}) endif() -message(STATUS "VTA build with VTA_HW_PATH=" ${VTA_HW_PATH}) - if(MSVC) message(STATUS "VTA build is skipped in Windows..") +elseif(NOT EXISTS ${VTA_HW_PATH}) + if (USE_VTA_TSIM OR USE_VTA_FSIM OR USE_UFPGA) + message(FATAL_ERROR "VTA path " ${VTA_HW_PATH} " does not exist") + endif() elseif(PYTHON) + message(STATUS "VTA build with VTA_HW_PATH=" ${VTA_HW_PATH}) set(VTA_CONFIG ${PYTHON} ${VTA_HW_PATH}/config/vta_config.py) if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/vta_config.json)