From ae1bbbdbddf47509bd8f0cd53133a35b64c656b8 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Sun, 30 Dec 2018 14:02:19 -0800 Subject: [PATCH] [xc7] Cope with BUILD_TESTS=off --- xc7/family.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xc7/family.cmake b/xc7/family.cmake index 0e8105f4..716430ee 100644 --- a/xc7/family.cmake +++ b/xc7/family.cmake @@ -15,7 +15,9 @@ if(GIT_FOUND AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules") endif() add_dependencies(nextpnr-${family} torc) -add_dependencies(nextpnr-${family}-test torc) +if (BUILD_TESTS) + add_dependencies(nextpnr-${family}-test torc) +endif() add_custom_target(torc ALL COMMAND $(MAKE) > /dev/null 2> /dev/null COMMENT "Building torc (may take some time...)" @@ -89,4 +91,6 @@ set(TORC_OBJS ) target_link_libraries(nextpnr-${family} PRIVATE ${TORC_OBJS}) -target_link_libraries(nextpnr-${family}-test PRIVATE ${TORC_OBJS}) +if (BUILD_TESTS) + target_link_libraries(nextpnr-${family}-test PRIVATE ${TORC_OBJS}) +endif()