[CMake] Added a new option 'OPENFPGA_WITH_VERSION_UP_TO_DATE' which allows users to skip version build (by default it remains always on)

This commit is contained in:
tangxifan 2022-10-03 11:11:21 -07:00
parent db7a052a2b
commit 81e524cec4
3 changed files with 6 additions and 2 deletions

View File

@ -67,6 +67,7 @@ include(CheckCXXCompilerFlag)
option(OPENFPGA_WITH_YOSYS "Enable building Yosys" ON)
option(OPENFPGA_WITH_YOSYS_PLUGIN "Enable building Yosys plugin" ON)
option(OPENFPGA_WITH_TEST "Enable testing build for codebase. Once enabled, make test can be run" ON)
option(OPENFPGA_WITH_VERSION_UP_TO_DATE "Enable version always-up-to-date when building codebase. Disable only when you do not care an accurate version number" ON)
# Options pass on to VTR
set(WITH_ABC ON CACHE BOOL "Enable building ABC in Verilog-to-Routing")
@ -79,6 +80,7 @@ set(ODIN_SANITIZE OFF CACHE BOOL "Enable building odin with sanitize flags in Ve
set(WITH_YOSYS OFF CACHE BOOL "Enable building Yosys in Verilog-to-Routing")
set(ODIN_YOSYS OFF CACHE BOOL "Enable building odin with yosys in Verilog-to-Routing")
set(YOSYS_SV_UHDM_PLUGIN OFF CACHE BOOL "Enable building and installing Yosys SystemVerilog and UHDM plugins in Verilog-to-Routing")
set(VTR_ENABLE_VERSION_UP_TO_DATE ${OPENFPGA_WITH_VERSION_UP_TO_DATE} CACHE BOOL "Enable version always-up-to-date when building codebase. Disable only when you do not care an accurate version number")
#
# We require c++14 support

View File

@ -74,7 +74,9 @@ target_include_directories(libopenfpgautil PUBLIC ${LIB_INCLUDE_DIRS})
set_target_properties(libopenfpgautil PROPERTIES PREFIX "") #Avoid extra 'lib' prefix
#Ensure version is always up to date by requiring version to be run first
add_dependencies(libopenfpgautil openfpga_version)
if (OPENFPGA_WITH_VERSION_UP_TO_DATE)
add_dependencies(libopenfpgautil openfpga_version)
endif()
#Specify link-time dependancies
target_link_libraries(libopenfpgautil

@ -1 +1 @@
Subproject commit 970afa5b96231272b305bbc3112ee9af662477ea
Subproject commit c33574d8db85efbc664798034992d43a7e49de77