Description: make the build reproducible by sorting the list of files to be linked
Author: Mattia Rizzolo <mattia@debian.org>
Forwarded: no
Last-Update: 2015-12-06

--- a/src/FlightCrew/CMakeLists.txt
+++ b/src/FlightCrew/CMakeLists.txt
@@ -25,6 +25,8 @@
 project( FlightCrew )
 
 file( GLOB_RECURSE SOURCES *.h *.cpp *.xsd *.dtd )
+# sort, so it won't depend on readdir() order and keep the build reproducible
+list( SORT SOURCES )
 
 # The test sources are a part of a different target, so we remove them
 file( GLOB_RECURSE to_remove tests/*.h tests/*.cpp )
--- a/src/FlightCrew-gui/CMakeLists.txt
+++ b/src/FlightCrew-gui/CMakeLists.txt
@@ -43,6 +43,8 @@
 #############################################################################
 
 file( GLOB_RECURSE RAW_SOURCES *.h *.cpp )
+# sort, so it won't depend on readdir() order and keep the build reproducible
+list( SORT RAW_SOURCES )
 
 set( QOBJECT_HEADERS
     MainWindow.h
--- a/src/zipios/CMakeLists.txt
+++ b/src/zipios/CMakeLists.txt
@@ -12,6 +12,8 @@
 project( zipios )
 
 file( GLOB_RECURSE SOURCES *.cpp *.h ) 
+# sort, so it won't depend on readdir() order and keep the build reproducible
+list( SORT SOURCES )
 
 # We need to pick up the stdafx.h file
 # and the headers for the linked-to libraries
--- a/src/XercesExtensions/CMakeLists.txt
+++ b/src/XercesExtensions/CMakeLists.txt
@@ -12,6 +12,8 @@
 project( XercesExtensions )
 
 file( GLOB SOURCES *.cpp *.h ) 
+# sort, so it won't depend on readdir() order and keep the build reproducible
+list( SORT SOURCES )
 
 # We need to pick up the stdafx.h file
 # and the headers for the linked-to libraries
