From 4d4d485c19925cf8c4122e553328ce320ff02439 Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 15 Aug 2024 16:55:36 +0200 Subject: [PATCH] chore: avoid rebuilding `leanmanifest` in each build (#5057) --- src/shell/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt index fa67b6d6c8..e07631be3e 100644 --- a/src/shell/CMakeLists.txt +++ b/src/shell/CMakeLists.txt @@ -4,7 +4,8 @@ set_target_properties(leanmain PROPERTIES OUTPUT_NAME leanmain) # library must contain at least one non-manifest file -file(WRITE ${CMAKE_BINARY_DIR}/temp/empty.c) +# We use `CONFIGURE` instead of `WRITE` so as to avoid touching the file on each run +file(CONFIGURE OUTPUT ${CMAKE_BINARY_DIR}/temp/empty.c CONTENT "") add_library(leanmanifest STATIC ${CMAKE_BINARY_DIR}/temp/empty.c manifest.rc) set_target_properties(leanmanifest PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/lean