From d16d34736f6565e67b5ad3563ed69552abefd305 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 12 Jul 2018 19:59:18 +0200 Subject: ecp5/cmake: Improve error message when trellis/pytrellis not found Signed-off-by: David Shah --- ecp5/family.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ecp5/family.cmake b/ecp5/family.cmake index f58cdbb2..f4d0bf87 100644 --- a/ecp5/family.cmake +++ b/ecp5/family.cmake @@ -1,6 +1,17 @@ set(devices 45k) +if (NOT DEFINED TRELLIS_ROOT) + message(FATAL_ERROR "you must define TRELLIS_ROOT using -DTRELLIS_ROOT=/path/to/prjtrellis for ECP5 support") +endif() + + +file( GLOB found_pytrellis ${TRELLIS_ROOT}/libtrellis/pytrellis.*) + +if ("${found_pytrellis}" STREQUAL "") + message(FATAL_ERROR "failed to find pytrellis library in ${TRELLIS_ROOT}/libtrellis/") +endif() + set(DB_PY ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/trellis_import.py) file(MAKE_DIRECTORY ecp5/chipdbs/) -- cgit v1.2.3