@ -102,6 +102,47 @@ macro( tde_execute_process )
endmacro ( tde_execute_process )
endmacro ( tde_execute_process )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ r e a d _ s r c _ m e t a d a t a
macro ( tde_read_src_metadata )
# l o o k f o r S C M d a t a i f p r e s e n t
if ( EXISTS "${CMAKE_SOURCE_DIR}/.tdescminfo" )
file ( READ "${CMAKE_SOURCE_DIR}/.tdescminfo" TDE_SCM_INFO )
string ( REGEX MATCH "(^|\n)Name: ([^\n]*)" TDE_SCM_MODULE_NAME "${TDE_SCM_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_SCM_MODULE_NAME "${TDE_SCM_MODULE_NAME}" )
string ( REGEX MATCH "(^|\n)Revision: ([^\n]*)" TDE_SCM_MODULE_REVISION "${TDE_SCM_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_SCM_MODULE_REVISION "${TDE_SCM_MODULE_REVISION}" )
string ( REGEX MATCH "(^|\n)DateTime: ([^\n]*)" TDE_SCM_MODULE_DATETIME "${TDE_SCM_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_SCM_MODULE_DATETIME "${TDE_SCM_MODULE_DATETIME}" )
else ( )
if ( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
file ( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmmodule" TDE_SCM_MODULE_NAME )
endif ( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
if ( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
file ( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmrevision" TDE_SCM_MODULE_REVISION )
endif ( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
endif ( )
# l o o k f o r p a c k a g e d a t a i f p r e s e n t
if ( EXISTS "${CMAKE_SOURCE_DIR}/.tdepkginfo" )
file ( READ "${CMAKE_SOURCE_DIR}/.tdepkginfo" TDE_PKG_INFO )
endif ( )
if ( EXISTS "${CMAKE_BINARY_DIR}/.tdepkginfo" )
file ( READ "${CMAKE_BINARY_DIR}/.tdepkginfo" TDE_PKG_INFO )
endif ( )
if ( TDE_PKG_INFO )
string ( REGEX MATCH "(^|\n)Name: ([^\n]*)" TDE_PKG_NAME "${TDE_PKG_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_PKG_NAME "${TDE_PKG_NAME}" )
string ( REGEX MATCH "(^|\n)Version: ([^\n]*)" TDE_PKG_REVISION "${TDE_PKG_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_PKG_VERSION "${TDE_PKG_VERSION}" )
string ( REGEX MATCH "(^|\n)DateTime: ([^\n]*)" TDE_PKG_DATETIME "${TDE_PKG_INFO}" )
string ( REGEX REPLACE "^[^:]*: " "" TDE_PKG_DATETIME "${TDE_PKG_DATETIME}" )
endif ( )
endmacro ( tde_read_src_metadata )
if ( DEFINED MASTER_SOURCE_DIR )
if ( DEFINED MASTER_SOURCE_DIR )
return ( )
return ( )
endif ( )
endif ( )
@ -865,6 +906,22 @@ macro( tde_add_kpart _target )
endmacro ( tde_add_kpart )
endmacro ( tde_add_kpart )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ c u r d a t e t i m e
macro ( tde_curdatetime result )
if ( TDE_PKG_DATETIME )
set ( ${ result } ${ TDE_PKG_DATETIME } )
elseif ( TDE_SCM_MODULE_DATETIME )
set ( ${ result } ${ TDE_SCM_MODULE_DATETIME } )
else ( )
tde_execute_process ( COMMAND "date" "+%m/%d/%Y %H:%M:%S" OUTPUT_VARIABLE ${ result } )
string ( REGEX REPLACE "(..)/(..)/(....) (........).*" "\\1/\\2/\\3 \\4" ${ result } ${ ${result } } )
endif ( )
endmacro ( tde_curdatetime )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # #
# # # # # t d e _ a d d _ e x e c u t a b l e
# # # # # t d e _ a d d _ e x e c u t a b l e