progversion.cmake 339 B

123456789
  1. function(SAVE_PROGVERSION SIM_NAME)
  2. add_custom_target("progversion.txt")
  3. add_custom_command(TARGET "progversion.txt"
  4. COMMAND hg tip > ${CMAKE_CURRENT_BINARY_DIR}/progversion.txt
  5. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  6. )
  7. add_dependencies("${SIM_NAME}" "progversion.txt")
  8. endfunction(SAVE_PROGVERSION)