File tree Expand file tree Collapse file tree 14 files changed +11
-38
lines changed Expand file tree Collapse file tree 14 files changed +11
-38
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ jobs:
132
132
env :
133
133
CC : clang
134
134
CFLAGS : -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer
135
- CMAKE_OPTIONS : -DC_EXTENSIONS =ON -DCMAKE_PREFIX_PATH=/usr/local/msan -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON
135
+ CMAKE_OPTIONS : -DCMAKE_C_EXTENSIONS =ON -DCMAKE_PREFIX_PATH=/usr/local/msan -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON -DUSE_SSH=ON
136
136
CMAKE_GENERATOR : Ninja
137
137
SKIP_SSH_TESTS : true
138
138
SKIP_NEGOTIATE_TESTS : true
Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ option(SONAME "Set the (SO)VERSION of the target"
53
53
option (DEPRECATE_HARD "Do not include deprecated functions in the library" OFF )
54
54
55
55
# Compilation options
56
+ # Default to c99 on Android Studio for compatibility; c90 everywhere else
57
+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Android" )
58
+ set (CMAKE_C_STANDARD "99" CACHE STRING "The C standard to compile against" )
59
+ else ()
60
+ set (CMAKE_C_STANDARD "90" CACHE STRING "The C standard to compile against" )
61
+ endif ()
62
+ option (CMAKE_C_EXTENSIONS "Whether compiler extensions are supported" OFF )
56
63
option (ENABLE_WERROR "Enable compilation with -Werror" OFF )
57
64
58
65
if (UNIX )
@@ -91,7 +98,6 @@ endif()
91
98
# Modules
92
99
93
100
include (FeatureSummary )
94
- include (SetCStandard )
95
101
include (CheckLibraryExists )
96
102
include (CheckFunctionExists )
97
103
include (CheckSymbolExists )
Original file line number Diff line number Diff line change @@ -378,8 +378,8 @@ linker. These flags may be useful for cross-compilation or specialized
378
378
setups.
379
379
380
380
- ` CMAKE_C_FLAGS ` : Set your own compiler flags
381
- - ` C_STANDARD ` : the C standard to compile against; defaults to ` C90 `
382
- - ` C_EXTENSIONS ` : whether compiler extensions are supported; defaults to ` OFF `
381
+ - ` CMAKE_C_STANDARD ` : the C standard to compile against; defaults to ` C90 `
382
+ - ` CMAKE_C_EXTENSIONS ` : whether compiler extensions are supported; defaults to ` OFF `
383
383
- ` CMAKE_FIND_ROOT_PATH ` : Override the search path for libraries
384
384
- ` ZLIB_LIBRARY ` , ` OPENSSL_SSL_LIBRARY ` AND ` OPENSSL_CRYPTO_LIBRARY ` :
385
385
Tell CMake where to find those specific libraries
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ void llhttp_free(llhttp_t* parser) {
93
93
free (parser );
94
94
}
95
95
96
- #endif // defined(__wasm__)
96
+ #endif /* defined(__wasm__)<
67F4
span class="x x-first x-last"> */
97
97
98
98
/* Some getters required to get stuff from the parser */
99
99
Original file line number Diff line number Diff line change 37
37
endif ()
38
38
39
39
add_library (ntlmclient OBJECT ${SRC_NTLMCLIENT} ${SRC_NTLMCLIENT_UNICODE} ${SRC_NTLMCLIENT_CRYPTO} )
40
- set_target_properties (ntlmclient PROPERTIES C_STANDARD 90 )
Original file line number Diff line number Diff line change 3
3
file (GLOB SRC_EXAMPLES *.c *.h )
4
4
5
5
add_executable (lg2 ${SRC_EXAMPLES} )
6
- set_c_standard (lg2 )
7
6
8
7
# Ensure that we do not use deprecated functions internally
9
8
add_definitions (-DGIT_DEPRECATE_HARD )
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ foreach(fuzz_target_src ${SRC_FUZZERS})
20
20
endif ()
21
21
22
22
add_executable (${fuzz_target_name} ${${fuzz_target_name}_SOURCES} )
23
- set_c_standard (${fuzz_target_name} )
24
23
target_include_directories (${fuzz_target_name} PRIVATE ${LIBGIT2_INCLUDES} ${LIBGIT2_DEPENDENCY_INCLUDES} )
25
24
target_include_directories (${fuzz_target_name} SYSTEM PRIVATE ${LIBGIT2_SYSTEM_INCLUDES} )
26
25
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ add_executable(git2_cli ${CLI_SRC_C} ${CLI_SRC_OS} ${CLI_OBJECTS}
40
40
${LIBGIT2_DEPENDENCY_OBJECTS} )
41
41
target_link_libraries (git2_cli ${CLI_LIBGIT2_LIBRARY} ${LIBGIT2_SYSTEM_LIBS} )
42
42
43
- set_c_standard (git2_cli )
44
43
set_target_properties (git2_cli PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR} )
45
44
set_target_properties (git2_cli PROPERTIES OUTPUT_NAME ${LIBGIT2_FILENAME} )
46
45
Original file line number Diff line number Diff line change 2
2
# git library functionality.
3
3
4
4
add_library (libgit2 OBJECT )
5
- set_c_standard (libgit2 )
6
5
7
6
include (PkgBuildConfig )
8
7
You can’t perform that action at this time.
0 commit comments