sort-cmake-glob-lists
authorA. Maitland Bottoms <bottoms@debian.org>
Sun, 4 Feb 2018 18:12:21 +0000 (18:12 +0000)
committerA. Maitland Bottoms <bottoms@debian.org>
Sun, 4 Feb 2018 18:12:21 +0000 (18:12 +0000)
Subject sort cmake glob lists

File lists are generated in a CMakeLists.txt file with file(GLOB ...), which varies
with the readdir() order. Sorting the lists should help make reproducinble builds.

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

lib/CMakeLists.txt

index 46451ececa8319d8e2848b7b27e520fb4dfdd0f3..dd3e05a7c37396dac42b58958be6fd5ea7ade97a 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})