Fix build not to delete git-describe.h

make doesn't keep primary output file if secundary is missing.
always_rebuild must be primary output to make the phony command work
correctly.
develop
Pauli 2018-06-25 16:31:58 +03:00
parent e34f10f3df
commit 3f34ea196b
1 changed files with 1 additions and 1 deletions

@ -326,7 +326,7 @@ ENDIF()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/git-describe.cmake) EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/git-describe.cmake)
target_include_directories(dfhack-version PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_include_directories(dfhack-version PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/git-describe.h always_rebuild ADD_CUSTOM_COMMAND(OUTPUT always_rebuild ${CMAKE_CURRENT_BINARY_DIR}/git-describe.h
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND}
-D dfhack_SOURCE_DIR:STRING=${dfhack_SOURCE_DIR} -D dfhack_SOURCE_DIR:STRING=${dfhack_SOURCE_DIR}
-D git_describe_h:STRING=${CMAKE_CURRENT_BINARY_DIR}/git-describe.h -D git_describe_h:STRING=${CMAKE_CURRENT_BINARY_DIR}/git-describe.h