From b70b13cc1a4760e4223741ea2ed4eeeae7ac8246 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Thu, 9 Jul 2020 12:27:57 -0700 Subject: [PATCH] dist.cmake: add 'rebuild_cache' warning. dist.cmake is (for now) the only .cmake file that uses GIT_TAG at _cmake configure time_. This means even "make clean" is not enough for dist.cmake to take into account some git tag or version change. It's very confusing because on the other hand "make check_version_h" and everything else always shows up-to-date git information. "make rebuild_cache" addresses this situation so mention it in a warning. Signed-off-by: Marc Herbert --- scripts/cmake/dist.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cmake/dist.cmake b/scripts/cmake/dist.cmake index 4dbea4ec62d8..ea7f1ead5621 100644 --- a/scripts/cmake/dist.cmake +++ b/scripts/cmake/dist.cmake @@ -26,7 +26,9 @@ add_custom_target(dist COMMAND gzip -9 < "${TARBALL_PATH_TMP}" > "${TARBALL_PATH}" WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" - COMMENT "Creating tarball: ${TARBALL_PATH}" + COMMENT "Creating tarball: ${TARBALL_PATH} +Warning: you must invoke make/ninja 'rebuild_cache' when the version changes, 'clean' is not enough. +" BYPRODUCTS "$TARBALL_VERSION_BINARY_PATH" "${TARBALL_PATH_TMP}" "${TARBALL_PATH}" VERBATIM USES_TERMINAL