Skip to content

Second try: fix cmake version file generation #2659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ endif()

file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/version.cpp.in
"const char *CBMC_VERSION=\"@CBMC_RELEASE@ (@GIT_INFO@)\";\n")
add_custom_command(
OUTPUT version.cpp
add_custom_target(
generate_version_cpp
BYPRODUCTS version.cpp
COMMAND ${CMAKE_COMMAND}
-D CBMC_SOURCE_DIR=${CBMC_SOURCE_DIR}
-D CUR=${CMAKE_CURRENT_BINARY_DIR}
Expand All @@ -42,6 +43,8 @@ add_library(util
${sources}
version.cpp)

add_dependencies(util generate_version_cpp)

generic_includes(util)

target_link_libraries(util big-int langapi)