3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-26 04:56:03 +00:00

Create VERSION.txt and update CMakeLists.txt to read version from file

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-08-20 15:45:25 +00:00
parent 886b5e501a
commit 4e51949669
1611 changed files with 283331 additions and 1 deletions

View file

@ -0,0 +1,24 @@
if(NOT EXISTS "/home/runner/work/z3/z3/test-cmake/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: "
"/home/runner/work/z3/z3/test-cmake/install_manifest.txt")
endif()
file(READ "/home/runner/work/z3/z3/test-cmake/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
set(_full_file_path "$ENV{DESTDIR}${file}")
message(STATUS "Uninstalling ${_full_file_path}")
if(IS_SYMLINK "${_full_file_path}" OR EXISTS "${_full_file_path}")
# We could use ``file(REMOVE ...)`` here but then we wouldn't
# know if the removal failed.
execute_process(COMMAND
"/usr/local/bin/cmake" "-E" "remove" "${_full_file_path}"
RESULT_VARIABLE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing \"${_full_file_path}\"")
endif()
else()
message(STATUS "File \"${_full_file_path}\" does not exist.")
endif()
endforeach()