1234567891011121314151617181920 |
- Description: Enable reproducible builds by default.
- Author: Utkarsh Gupta <utkarsh@debian.org>
- --- a/CMakeLists.txt
- +++ b/CMakeLists.txt
- @@ -188,6 +188,13 @@
- SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
- SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
- SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}")
- +
- + # Enable reproducible builds by default
- + SET(CMAKE_C_FLAGS "-ffile-prefix-map=${CMAKE_SOURCE_DIR}=. ${CMAKE_C_FLAGS}")
- + SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Dqc <TARGET> <LINK_FLAGS> <OBJECTS>")
- + SET(CMAKE_C_ARCHIVE_APPEND "<CMAKE_AR> Dq <TARGET> <LINK_FLAGS> <OBJECTS>")
- + SET(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -D <TARGET>")
- +
- ELSE ()
- IF (ENABLE_REPRODUCIBLE_BUILDS)
- SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Dqc <TARGET> <LINK_FLAGS> <OBJECTS>")
|