Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3b7b4d27
Unverified
Commit
3b7b4d27
authored
May 23, 2020
by
Edward Thomson
Committed by
GitHub
May 23, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5523 from libgit2/pks/cmake-sort-reproducible-builds
cmake: Sort source files for reproducible builds
parents
b7b872f5
b85eefb4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
25 deletions
+36
-25
cmake/Modules/SelectHashes.cmake
+2
-0
deps/http-parser/CMakeLists.txt
+4
-3
deps/ntlmclient/CMakeLists.txt
+1
-0
deps/zlib/CMakeLists.txt
+6
-5
src/CMakeLists.txt
+23
-17
No files found.
cmake/Modules/SelectHashes.cmake
View file @
3b7b4d27
...
...
@@ -56,4 +56,6 @@ ELSE()
MESSAGE(FATAL_ERROR "
Asked for unknown SHA1 backend:
${
USE_SHA1
}
")
ENDIF()
list(SORT SRC_SHA1)
ADD_FEATURE_INFO(SHA ON "
using
${
USE_SHA1
}
")
deps/http-parser/CMakeLists.txt
View file @
3b7b4d27
FILE
(
GLOB SRC_HTTP
"*.c"
"*.h"
)
file
(
GLOB SRC_HTTP
"*.c"
"*.h"
)
list
(
SORT SRC_HTTP
)
ADD_LIBRARY
(
http-parser OBJECT
${
SRC_HTTP
}
)
add_library
(
http-parser OBJECT
${
SRC_HTTP
}
)
ENABLE_WARNINGS
(
implicit-fallthrough=1
)
enable_warnings
(
implicit-fallthrough=1
)
deps/ntlmclient/CMakeLists.txt
View file @
3b7b4d27
FILE
(
GLOB SRC_NTLMCLIENT
"ntlm.c"
"unicode_builtin.c"
"util.c"
)
LIST
(
SORT SRC_NTLMCLIENT
)
ADD_DEFINITIONS
(
-DNTLM_STATIC=1
)
...
...
deps/zlib/CMakeLists.txt
View file @
3b7b4d27
DISABLE_WARNINGS
(
implicit-fallthrough
)
ADD_DEFINITIONS
(
-DNO_VIZ -DSTDC -DNO_GZIP
)
FILE
(
GLOB SRC_ZLIB
"*.c"
"*.h"
)
INCLUDE_DIRECTORIES
(
"."
)
ADD_LIBRARY
(
zlib OBJECT
${
SRC_ZLIB
}
)
disable_warnings
(
implicit-fallthrough
)
add_definitions
(
-DNO_VIZ -DSTDC -DNO_GZIP
)
file
(
GLOB SRC_ZLIB
"*.c"
"*.h"
)
list
(
SORT SRC_ZLIB
)
include_directories
(
"."
)
add_library
(
zlib OBJECT
${
SRC_ZLIB
}
)
src/CMakeLists.txt
View file @
3b7b4d27
...
...
@@ -76,12 +76,13 @@ ENDIF()
ADD_FEATURE_INFO
(
threadsafe THREADSAFE
"threadsafe support"
)
IF
(
WIN32 AND EMBED_SSH_PATH
)
FILE
(
GLOB SRC_SSH
"
${
EMBED_SSH_PATH
}
/src/*.c"
)
LIST
(
APPEND LIBGIT2_SYSTEM_INCLUDES
"
${
EMBED_SSH_PATH
}
/include"
)
FILE
(
WRITE
"
${
EMBED_SSH_PATH
}
/src/libssh2_config.h"
"#define HAVE_WINCNG
\n
#define LIBSSH2_WINCNG
\n
#include
\"
../win32/libssh2_config.h
\"
"
)
SET
(
GIT_SSH 1
)
ENDIF
()
if
(
WIN32 AND EMBED_SSH_PATH
)
file
(
GLOB SRC_SSH
"
${
EMBED_SSH_PATH
}
/src/*.c"
)
list
(
SORT SRC_SSH
)
list
(
APPEND LIBGIT2_SYSTEM_INCLUDES
"
${
EMBED_SSH_PATH
}
/include"
)
file
(
WRITE
"
${
EMBED_SSH_PATH
}
/src/libssh2_config.h"
"#define HAVE_WINCNG
\n
#define LIBSSH2_WINCNG
\n
#include
\"
../win32/libssh2_config.h
\"
"
)
set
(
GIT_SSH 1
)
endif
()
IF
(
WIN32 AND WINHTTP
)
SET
(
GIT_WINHTTP 1
)
...
...
@@ -267,33 +268,38 @@ ENDIF()
ADD_DEFINITIONS
(
-D_FILE_OFFSET_BITS=64
)
# Collect sourcefiles
FILE
(
GLOB SRC_H
file
(
GLOB SRC_H
"
${
libgit2_SOURCE_DIR
}
/include/git2.h"
"
${
libgit2_SOURCE_DIR
}
/include/git2/*.h"
"
${
libgit2_SOURCE_DIR
}
/include/git2/sys/*.h"
)
list
(
SORT SRC_H
)
# On Windows use specific platform sources
IF
(
WIN32 AND NOT CYGWIN
)
IF
(
MSVC
)
if
(
WIN32 AND NOT CYGWIN
)
if
(
MSVC
)
SET
(
WIN_RC
"win32/git2.rc"
)
ENDIF
()
endif
()
FILE
(
GLOB SRC_OS win32/*.c win32/*.h
)
ELSEIF
(
AMIGA
)
ADD_DEFINITIONS
(
-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP
)
ELSE
()
FILE
(
GLOB SRC_OS unix/*.c unix/*.h
)
ENDIF
()
file
(
GLOB SRC_OS win32/*.c win32/*.h
)
list
(
SORT SRC_OS
)
elseif
(
AMIGA
)
add_definitions
(
-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP
)
else
()
file
(
GLOB SRC_OS unix/*.c unix/*.h
)
list
(
SORT SRC_OS
)
endif
()
IF
(
USE_LEAK_CHECKER STREQUAL
"valgrind"
)
ADD_DEFINITIONS
(
-DVALGRIND
)
ENDIF
()
FILE
(
GLOB SRC_GIT2 *.c *.h
file
(
GLOB SRC_GIT2 *.c *.h
allocators/*.c allocators/*.h
streams/*.c streams/*.h
transports/*.c transports/*.h
xdiff/*.c xdiff/*.h
)
list
(
SORT SRC_GIT2
)
IF
(
APPLE
)
# The old Secure Transport API has been deprecated in macOS 10.15.
SET_SOURCE_FILES_PROPERTIES
(
streams/stransport.c PROPERTIES COMPILE_FLAGS -Wno-deprecated
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment