# ICEDUST_CREATE_PACKAGE_VERSION # ------------------------------ # # Macro to create the version include file # Mimics the version fragment used by CMT # # All files are created from template files located at ICEDUST_packages/cmake/ # # Output # ^^^^^ # # Creates: # ${PROJECT_NAME}_version.h # at: CURRENT_BINARY_DIR/version # # Previously this file was always created in-source. # Now: Depending on the provided option (in- or out-source) # CURRENT_BINARY_DIR directory is located out- or in-source. # # # manager COMET Software Group # author andreas.jansen@tu-dresden.de function(ICEDUST_CREATE_PACKAGE_VERSION) # --- all uname information --- execute_process(COMMAND "uname" "-a" OUTPUT_VARIABLE RESULT_OF_UNAME_A OUTPUT_STRIP_TRAILING_WHITESPACE) # --- compile host information --- execute_process(COMMAND "uname" "-n" OUTPUT_VARIABLE RESULT_OF_UNAME_N OUTPUT_STRIP_TRAILING_WHITESPACE) # --- date of compilation --- execute_process(COMMAND "date" "-u" OUTPUT_VARIABLE RESULT_OF_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) # --- create _version.h file --- configure_file ( "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/version.in" #INPUT-File "${CMAKE_CURRENT_BINARY_DIR}/version/${PROJECT_NAME}_version.h" #OUTPUT-File ) endfunction()