build: fix ysyx tracker

The git tracker for npc is not working since I refactor build system at commit f02d5eb2.
This commit is contained in:
xinyangli 2024-04-11 14:07:05 +08:00
parent e99236f711
commit 4c07b66093
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk

View file

@ -13,7 +13,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
option(BUILD_USE_BLOOP "Whether to use bloop to speed up elaborate" ON) option(BUILD_USE_BLOOP "Whether to use bloop to speed up elaborate" ON)
option(BUILD_SIM_TARGET "Whether to build verilator simulation binary" ON) option(BUILD_SIM_TARGET "Whether to build verilator simulation binary" ON)
cmake_dependent_option(BUILD_SIM_NVBOARD_TARGET "Whether to build nvboard target" OFF "BUILD_SIM_TARGET" OFF) cmake_dependent_option(BUILD_SIM_NVBOARD_TARGET "Whether to build nvboard target" OFF "BUILD_SIM_TARGET" OFF)
option(ENABLE_YSYX_GIT_TRACKER "Ysyx tracker support" OFF) option(ENABLE_YSYX_GIT_TRACKER "Ysyx tracker support" ON)
set(TOPMODULE "Flow" CACHE STRING "Topmodule name in chisel") set(TOPMODULE "Flow" CACHE STRING "Topmodule name in chisel")
set(DIFFTEST_LIB "" CACHE STRING "Dynamic library file used as difftest reference") set(DIFFTEST_LIB "" CACHE STRING "Dynamic library file used as difftest reference")
@ -69,14 +69,8 @@ add_subdirectory(csrc)
# -- Add build tracking # -- Add build tracking
if(ENABLE_YSYX_GIT_TRACKER) if(ENABLE_YSYX_GIT_TRACKER)
add_custom_command( add_custom_target(
TARGET V${TOPMODULE}_nvboard PRE_BUILD ysyx_git_tracer ALL
COMMAND ${CMAKE_SOURCE_DIR}/../git_commit.sh "build_${CMAKE_PROJECT_NAME}_V${TOPMODULE}_nvboard"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..
)
add_custom_command(
TARGET V${TOPMODULE} PRE_BUILD
COMMAND ${CMAKE_SOURCE_DIR}/../git_commit.sh "build_${CMAKE_PROJECT_NAME}_V${TOPMODULE}" COMMAND ${CMAKE_SOURCE_DIR}/../git_commit.sh "build_${CMAKE_PROJECT_NAME}_V${TOPMODULE}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/.. WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..
) )