[cmake] now rename version to short 'OPENFPGA_ENABLE_VERSION'
This commit is contained in:
parent
a144794ce6
commit
cc6bf85433
|
@ -67,7 +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)
|
||||
option(OPENFPGA_WITH_VERSION "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")
|
||||
|
@ -80,7 +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")
|
||||
set(VTR_ENABLE_VERSION ${OPENFPGA_WITH_VERSION} 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
|
||||
|
|
|
@ -37,7 +37,7 @@ set(OPENFPGA_BUILD_INFO "${OPENFPGA_BUILD_INFO} ASSERT_LEVEL=${VTR_ASSERT_LEVEL}
|
|||
# 2) The custom command depends on the touched version input file and generates the processed
|
||||
# version file, with updated values. The custom command uses the configure_version.cmake
|
||||
# script to generate the up-to-date openfpga_version.cpp
|
||||
if (OPENFPGA_WITH_VERSION_UP_TO_DATE)
|
||||
if (OPENFPGA_WITH_VERSION)
|
||||
add_custom_target(openfpga_version ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${OPENFPGA_VERSION_FILE_IN})
|
||||
|
||||
|
@ -55,6 +55,9 @@ if (OPENFPGA_WITH_VERSION_UP_TO_DATE)
|
|||
MAIN_DEPENDENCY ${OPENFPGA_VERSION_FILE_IN}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM)
|
||||
else()
|
||||
# Just copy the input file to output file with version number
|
||||
configure_file(${OPENFPGA_VERSION_FILE_IN} ${OPENFPGA_VERSION_FILE_OUT})
|
||||
endif()
|
||||
|
||||
#file(GLOB_RECURSE EXEC_SOURCES test/main.cpp)
|
||||
|
@ -76,7 +79,7 @@ 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
|
||||
if (OPENFPGA_WITH_VERSION_UP_TO_DATE)
|
||||
if (OPENFPGA_WITH_VERSION)
|
||||
add_dependencies(libopenfpgautil openfpga_version)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 147200b1edce48a22705f470c9fa937cb56e1b10
|
||||
Subproject commit 942d1bbfff837d9c5409f6f0932dec574fb7e7c2
|
Loading…
Reference in New Issue