Skip to content

Commit 578b265

Browse files
committed
Updates CMakeLists.txt to avoid recreating vdate.c if nothing has changed
Creating vdate.c/vdate.o should not be done unconditionally. It is only necessary to recreate it if one of the input files has changed.
1 parent 13cbc33 commit 578b265

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ SET(MAIKO_HDRS
438438
inc/z2defs.h
439439
)
440440

441-
ADD_CUSTOM_TARGET(gen-vdate
441+
ADD_CUSTOM_COMMAND(OUTPUT vdate.c
442442
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/bin/mkvdate > vdate.c
443-
BYPRODUCTS vdate.c
443+
DEPENDS ${MAIKO_SRCS} ${MAIKO_HDRS} ${MAIKO_DISPLAY_X11_SRCS} ${MAIKO_DISPLAY_X11_HDRS} ${MAIKO_DISPLAY_SDL_SRCS} ${MAIKO_DISPLAY_SDL_HDRS}
444444
)
445445

446446
ADD_EXECUTABLE(lde src/ldeboot.c src/unixfork.c)

0 commit comments

Comments
 (0)