diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-08-06 03:15:09 +0200 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-09-18 22:34:43 +0900 |
commit | 4397680ce96d859f37f5afbc9bfa07b5a800f199 (patch) | |
tree | b539ecde373d80d30dac53d059b39495c97cdf9f /modules | |
parent | cd66012f18ddf0cbe07246d0aceafa2da60ed9e9 (diff) | |
download | tde-cmake-4397680ce96d859f37f5afbc9bfa07b5a800f199.tar.gz tde-cmake-4397680ce96d859f37f5afbc9bfa07b5a800f199.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 de7ca8b..6e61d4a 100644 --- a/modules/TDEMacros.cmake +++ b/modules/TDEMacros.cmake @@ -2263,8 +2263,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 ) |