sort cmake glob lists
authorA. Maitland Bottoms <bottoms@debian.org>
Wed, 28 Mar 2018 02:04:11 +0000 (22:04 -0400)
committerA. Maitland Bottoms <bottoms@debian.org>
Sat, 12 May 2018 19:25:04 +0000 (20:25 +0100)
File lists are generated in a CMakeLists.txt file with file(GLOB ...), which varies
with the readdir() order. Sorting the lists should help make reproducible builds.

Gbp-Pq: Name sort-cmake-glob-lists

lib/CMakeLists.txt

index 3a8650de4aacb2a5045f03528fab13e1cf84afc9..3f68c3a0587bbaf8e343650d730598c53b7fd948 100644 (file)
@@ -328,8 +328,11 @@ message(STATUS "Available machines: ${available_machines}")
 
 #dependencies are all python, xml, and header implementation files
 file(GLOB xml_files ${PROJECT_SOURCE_DIR}/gen/*.xml)
+list(SORT xml_files)
 file(GLOB py_files ${PROJECT_SOURCE_DIR}/gen/*.py)
+list(SORT py_files)
 file(GLOB h_files ${PROJECT_SOURCE_DIR}/kernels/volk/*.h)
+list(SORT h_files)
 
 macro(gen_template tmpl output)
     list(APPEND volk_gen_sources ${output})