From fb4f389731cf5a26a0a13e4d31bbbb61724989e7 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: [PATCH] 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 --- modules/TDEMacros.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake index 4554826..471a206 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 )