Skip to content

Commit 416fdd9

Browse files
wangrong1069deepin-bot[bot]
authored andcommitted
fix: Fix non-reproducible builds
Skip build rpath when the build type is set to "Release" to ensure reproducible builds.
1 parent 7ce7c7d commit 416fdd9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ endif()
4848
#set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -g -fsanitize=address -O2")
4949
#set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -fsanitize=address -O2")
5050

51+
# Skip build rpath for reproducible release build
52+
if(CMAKE_BUILD_TYPE STREQUAL "Release")
53+
set(CMAKE_SKIP_BUILD_RPATH TRUE)
54+
endif()
55+
5156
ADD_SUBDIRECTORY(basestruct)
5257
ADD_SUBDIRECTORY(log)
5358
ADD_SUBDIRECTORY(application)

0 commit comments

Comments
 (0)