From: Gereon Kremer Date: Wed, 23 Mar 2022 08:27:33 +0000 (+0100) Subject: Run gen-versioninfo unconditionally (#8368) X-Git-Tag: cvc5-1.0.0~198 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7c895b75068b037d2abb36fa9d88bd87847aa641;p=cvc5.git Run gen-versioninfo unconditionally (#8368) This fixes an issue where the output of `--show-config` would not be updated properly in certain cases (e.g., when files were modified but cmake is not run). We now run the `gen-versioninfo` target unconditionally, always updating the `versioninfo.cpp` where the version data for `--show-config` is stored. --- diff --git a/cmake/version.cmake b/cmake/version.cmake index 183fe213b..87ba19933 100644 --- a/cmake/version.cmake +++ b/cmake/version.cmake @@ -25,19 +25,11 @@ if(CMAKE_SCRIPT_MODE_FILE) else() # was run within the overall cmake project # add target to update versioninfo.cpp at build time - add_custom_command( - OUTPUT - ${CMAKE_BINARY_DIR}/src/base/versioninfo.cpp + add_custom_target(gen-versioninfo COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DCMAKE_BINARY_DIR=${CMAKE_BINARY_DIR} -P ${PROJECT_SOURCE_DIR}/cmake/version.cmake - DEPENDS - ${PROJECT_SOURCE_DIR}/cmake/version-base.cmake - ${PROJECT_SOURCE_DIR}/cmake/version.cmake - ) - add_custom_target(gen-versioninfo - DEPENDS ${CMAKE_BINARY_DIR}/src/base/versioninfo.cpp ) endif()