From 305c033eb599522ab8b2edd6bf75c4c20be35303 Mon Sep 17 00:00:00 2001 From: tangxifan Date: Fri, 3 Feb 2023 22:13:53 -0800 Subject: [PATCH] [script] fixed a few bugs --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e23d09b1b..7b953d9b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,15 +312,15 @@ endif() # we will check if yosys already exist. if not then build it if (OPENFPGA_WITH_YOSYS) - if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/yosys/install/bin/yosys) + if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/yosys) message(STATUS "Yosys pre-build exist so skipping it") else () # run makefile provided, we pass-on the options to the local make file add_custom_target( yosys ALL COMMAND $(MAKE) config-gcc - COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_BINARY_DIR}/yosys/install - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yosys + COMMAND $(MAKE) install PREFIX=${CMAKE_CURRENT_BINARY_DIR}/yosys + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys COMMENT "Compile Yosys with given Makefile" ) # yosys compilation ends @@ -329,9 +329,9 @@ if (OPENFPGA_WITH_YOSYS) if (OPENFPGA_WITH_YOSYS_PLUGIN) add_custom_target( yosys-plugins ALL - COMMAND $(MAKE) install_ql-qlf YOSYS_PATH=${CMAKE_CURRENT_BINARY_DIR}/yosys/install EXTRA_FLAGS="-DPASS_NAME=synth_ql" - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/yosys-plugins - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/yosys/install/bin/yosys + COMMAND $(MAKE) install_ql-qlf YOSYS_PATH=${CMAKE_CURRENT_BINARY_DIR}/yosys EXTRA_FLAGS="-DPASS_NAME=synth_ql" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/yosys-plugins + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/yosys COMMENT "Compile Yosys-plugins with given Makefile" ) add_dependencies(yosys-plugins yosys)