diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-18 17:53:35 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-19 19:27:29 +0900 |
commit | c0a6f1b84c84749908961579b84513fd9f9d9eac (patch) | |
tree | ace7ba60cb031acd3a1f4ff10f7bbc5668fa801f /debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake | |
parent | 52e5ffe140f0f4402e97936447bc9a606045d2b5 (diff) | |
download | extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.tar.gz extra-dependencies-c0a6f1b84c84749908961579b84513fd9f9d9eac.zip |
uncrustify-trinity: updated based on upstream version 0.78.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake new file mode 100644 index 00000000..3d6d376b --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/cmake/GenerateVersionHeader.cmake @@ -0,0 +1,39 @@ +# +# Generate uncrustify_version.h from uncrustify_version.h.in +# +# This script is meant to be executed with `cmake -P` from a custom target, +# and expects the variables `PYTHON_EXECUTABLE`, `SOURCE_DIR`, `INPUT`, +# `OUTPUT` and `UNCRUSTIFY_VERSION` to be set. +# + + +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${SOURCE_DIR}/scripts/make_version.py + WORKING_DIRECTORY ${SOURCE_DIR} + RESULT_VARIABLE make_version_error + OUTPUT_VARIABLE make_version_output +) + +if (make_version_error) + # It's normal for make_version.py to fail when building from a tarball, so we + # want to avoid anything that looks too much like a scary error. Thus, report + # the error in an innocuous-looking fashion. + # + # If make_version.py is failing unexpectedly and needs to be debugged, + # uncomment the next few lines. + # string(STRIP "${make_version_output}" make_version_output) + # message(STATUS + # "scripts/make_version.py exited with code ${make_version_error}: " + # "${make_version_output}") + + message(STATUS + "Unable to determine version from source tree; " + "fallback version '${UNCRUSTIFY_VERSION}' will be used") + message(STATUS + "(This is normal if you are building from a zip / tarball)") +else() + string(STRIP ${make_version_output} UNCRUSTIFY_VERSION) + message(STATUS "Version: '${UNCRUSTIFY_VERSION}'") +endif() + +configure_file("${INPUT}" "${OUTPUT}" @ONLY) |