1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-31 07:13:03 +00:00

Improve package reproducibility

Packages using CMake often use file(GLOB ...) to retrieve a list of
source files. As this is based on readdir(), the resulting file list
is unsorted. A common use case is to pass this list directly to
add_executable or add_library. But as the order is unpredictable, the
binaries are not reproducible (because the order in which the objects
are linked will vary).

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824263
This commit is contained in:
Carles Fernandez
2016-05-23 19:51:59 +02:00
parent 7bbffc3b4f
commit 5a73b4e047
34 changed files with 43 additions and 2 deletions

View File

@@ -33,6 +33,7 @@ include_directories(
)
file(GLOB TELEMETRY_DECODER_LIB_HEADERS "*.h")
list(SORT TELEMETRY_DECODER_LIB_HEADERS)
add_library(telemetry_decoder_lib ${TELEMETRY_DECODER_LIB_SOURCES} ${TELEMETRY_DECODER_LIB_HEADERS})
source_group(Headers FILES ${TELEMETRY_DECODER_LIB_HEADERS})
target_link_libraries(telemetry_decoder_lib gnss_system_parameters)