From 4397680ce96d859f37f5afbc9bfa07b5a800f199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 6 Aug 2020 03:15:09 +0200 Subject: tde_create_tarball: SOURCEDIR can be specified as relative. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit fb4f389731cf5a26a0a13e4d31bbbb61724989e7) --- modules/TDEMacros.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules') 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 ) -- cgit v1.2.1