mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
A step with a custom command shouldn't be seen as out-of-date just because the user re-runs configure with a different log level. Previously, the log level was written directly to the step scripts, but that meant the script changes if the user specifies a different effective log level to the previous configure. Now we move the log level detection into the script so that the script remains the same no matter what log level the user asks for. This was most noticeable with the PATCH step, since that always uses a custom command when present. Changing the log level would cause the PATCH step to re-run, which usually results in an error because PATCH typically only expects to run once after a DOWNLOAD. But the underlying problem would affect any step with a custom command, not just PATCH. Fixes: #28055
8 lines
211 B
CMake
8 lines
211 B
CMake
if(EXISTS "${PATCH_COUNT_FILE}")
|
|
file(READ "${PATCH_COUNT_FILE}" patch_count)
|
|
else()
|
|
set(patch_count 0)
|
|
endif()
|
|
math(EXPR patch_count "${patch_count} + 1")
|
|
file(WRITE "${PATCH_COUNT_FILE}" "${patch_count}")
|