diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-08-06 03:15:09 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2020-09-18 15:43:22 +0200 |
commit | 88b18c3ddd00115565b03a736aed4a1a58cd7969 (patch) | |
tree | de4c26c4e5c567b81cfbadcfc6c70caa8f10ff30 /modules | |
parent | 641dd35df12becc8ee3680114a7003cd4027faf2 (diff) | |
download | tde-cmake-88b18c3ddd00115565b03a736aed4a1a58cd7969.tar.gz tde-cmake-88b18c3ddd00115565b03a736aed4a1a58cd7969.zip |
tde_create_tarball: SOURCEDIR can be specified as relative.
If the list of files is obtained internally in a macro,
it will be sorted. This prevents unexpected order of files
- improves certainty for reproducible builds.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit fb4f389731cf5a26a0a13e4d31bbbb61724989e7)
Diffstat (limited to 'modules')
-rw-r--r-- | modules/TDEMacros.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 344937b..e608653 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -2076,8 +2076,13 @@ macro( tde_create_tarball ) tde_message_fatal( "Target tarball name not specified." ) endif( ) + if( NOT IS_ABSOLUTE ${_sourcedir} ) + set( _sourcedir "${CMAKE_CURRENT_SOURCE_DIR}/${_sourcedir}" ) + endif( ) + if( NOT _files ) file( GLOB_RECURSE _files RELATIVE ${_sourcedir} "${_sourcedir}/*" ) + list( SORT _files ) endif( ) unset( _files_deps ) |