- keep line lengths below 132 characters.
- fix two "weird indentation" warnings.
Reported-by: Dan Fandrich
Bug: #14580
Closes #14583
set(GSS_VERSION "Heimdal Unknown")
endif()
elseif(NOT GSS_VERSION AND GSS_FLAVOUR STREQUAL "MIT")
- get_filename_component(_mit_version "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME CACHE)
+ get_filename_component(_mit_version "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MIT\\Kerberos\\SDK\\CurrentVersion;VersionString]" NAME
+ CACHE)
if(WIN32 AND _mit_version)
set(GSS_VERSION "${_mit_version}")
else()
"Could NOT find GSS, try to set the path to GSS root folder in the system variable GSS_ROOT_DIR"
)
-mark_as_advanced(_GSS_CFLAGS _GSS_FOUND _GSS_INCLUDE_DIRS _GSS_LDFLAGS _GSS_LIBRARIES _GSS_LIBRARY_DIRS _GSS_MODULE_NAME _GSS_PREFIX _GSS_VERSION)
+mark_as_advanced(
+ _GSS_CFLAGS
+ _GSS_FOUND
+ _GSS_INCLUDE_DIRS
+ _GSS_LDFLAGS
+ _GSS_LIBRARIES
+ _GSS_LIBRARY_DIRS
+ _GSS_MODULE_NAME
+ _GSS_PREFIX
+ _GSS_VERSION
+)
if(CURL_WERROR AND
((CMAKE_COMPILER_IS_GNUCC AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0 AND
- NOT CMAKE_VERSION VERSION_LESS 3.23.0) OR # check_symbol_exists() incompatible with GCC -pedantic-errors in earlier CMake versions
+ NOT CMAKE_VERSION VERSION_LESS 3.23.0) OR # to avoid check_symbol_exists() conflicting with GCC -pedantic-errors
CMAKE_C_COMPILER_ID MATCHES "Clang"))
set(WPICKY "${WPICKY} -pedantic-errors")
endif()
-Wmissing-noreturn # clang 2.7 gcc 4.1
-Wno-format-nonliteral # clang 1.0 gcc 2.96 (3.0)
-Wno-system-headers # clang 1.0 gcc 3.0
- # -Wpadded # clang 2.9 gcc 4.1 # Not used because we cannot change public structs
+ # -Wpadded # clang 2.9 gcc 4.1 # Not used: We cannot change public structs
-Wold-style-definition # clang 2.7 gcc 3.4
-Wredundant-decls # clang 2.7 gcc 4.1
-Wsign-conversion # clang 2.9 gcc 4.3
-Wno-error=sign-conversion # FIXME
-Wstrict-prototypes # clang 1.0 gcc 3.3
- # -Wswitch-enum # clang 2.7 gcc 4.1 # Not used because this basically disallows default case
+ # -Wswitch-enum # clang 2.7 gcc 4.1 # Not used: It basically disallows default case
-Wtype-limits # clang 2.7 gcc 4.3
-Wunreachable-code # clang 2.7 gcc 4.1
# -Wunused-macros # clang 2.7 gcc 4.1 # Not practical
if((CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 10.0) OR
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.4))
list(APPEND WPICKY_ENABLE
- -Wimplicit-fallthrough # clang 4.0 gcc 7.0 appleclang 12.4 # we have silencing markup for clang 10.0 and above only
+ -Wimplicit-fallthrough # clang 4.0 gcc 7.0 appleclang 12.4 # We do silencing for clang 10.0 and above only
)
endif()
else() # gcc
option(ENABLE_CURLDEBUG "Set to ON to build with TrackMemory feature enabled" ${ENABLE_DEBUG})
if(MSVC)
- set(ENABLE_CURLDEBUG OFF) # FIXME: TrackMemory fails with MSVC according to test 558 and 1330. Tested with static build, Debug mode.
+ set(ENABLE_CURLDEBUG OFF) # FIXME: TrackMemory + MSVC fails test 558 and 1330. Tested with static build, Debug mode.
endif()
if(ENABLE_DEBUG)
if(USE_OPENSSL)
openssl_check_symbol_exists("SSL_CTX_set_quic_method" "openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD "")
elseif(USE_WOLFSSL)
- openssl_check_symbol_exists("wolfSSL_set_quic_method" "wolfssl/options.h;wolfssl/openssl/ssl.h" HAVE_SSL_CTX_SET_QUIC_METHOD "")
+ openssl_check_symbol_exists("wolfSSL_set_quic_method" "wolfssl/options.h;wolfssl/openssl/ssl.h"
+ HAVE_SSL_CTX_SET_QUIC_METHOD "")
endif()
endif()
if(NOT HAVE_SSL_CTX_SET_QUIC_METHOD)
string(REGEX REPLACE "([a-zA-Z_][a-zA-Z0-9_]*)[\t ]*=[\t ]*([^\n]*)" "SET(\\1 \\2)" _makefile_inc_text ${_makefile_inc_text})
string(REPLACE "!π!α!" "\n" _makefile_inc_text ${_makefile_inc_text})
- string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" _makefile_inc_text ${_makefile_inc_text}) # Replace $() with ${}
- string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" _makefile_inc_text ${_makefile_inc_text}) # Replace @@ with ${}, even if that may not be read by CMake scripts.
+ # Replace $() with ${}
+ string(REGEX REPLACE "\\$\\(([a-zA-Z_][a-zA-Z0-9_]*)\\)" "\${\\1}" _makefile_inc_text ${_makefile_inc_text})
+ # Replace @@ with ${}, even if that may not be read by CMake scripts.
+ string(REGEX REPLACE "@([a-zA-Z_][a-zA-Z0-9_]*)@" "\${\\1}" _makefile_inc_text ${_makefile_inc_text})
+
file(WRITE ${_output_file} ${_makefile_inc_text})
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${_input_file}")
endfunction()
# SUPPORT_FEATURES
# SUPPORT_PROTOCOLS
# VERSIONNUM
- configure_file("${CURL_SOURCE_DIR}/curl-config.in"
- "${CURL_BINARY_DIR}/curl-config" @ONLY)
+ configure_file(
+ "${CURL_SOURCE_DIR}/curl-config.in"
+ "${CURL_BINARY_DIR}/curl-config" @ONLY)
install(FILES "${CURL_BINARY_DIR}/curl-config"
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS
# prefix
# SUPPORT_FEATURES
# SUPPORT_PROTOCOLS
- configure_file("${CURL_SOURCE_DIR}/libcurl.pc.in"
- "${CURL_BINARY_DIR}/libcurl.pc" @ONLY)
+ configure_file(
+ "${CURL_SOURCE_DIR}/libcurl.pc.in"
+ "${CURL_BINARY_DIR}/libcurl.pc" @ONLY)
install(FILES "${CURL_BINARY_DIR}/libcurl.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
OUTPUT "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "#include \"tool_setup.h\"" > "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "#ifndef HAVE_LIBZ" >> "tool_hugehelp.c"
- COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" < "${CURL_BINARY_DIR}/docs/cmdline-opts/curl.txt" >> "tool_hugehelp.c"
+ COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl"
+ < "${CURL_BINARY_DIR}/docs/cmdline-opts/curl.txt" >> "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "#else" >> "tool_hugehelp.c"
- COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c < "${CURL_BINARY_DIR}/docs/cmdline-opts/curl.txt" >> "tool_hugehelp.c"
+ COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mkhelp.pl" -c
+ < "${CURL_BINARY_DIR}/docs/cmdline-opts/curl.txt" >> "tool_hugehelp.c"
COMMAND ${CMAKE_COMMAND} -E echo "#endif /* HAVE_LIBZ */" >> "tool_hugehelp.c"
DEPENDS
"generate-curl.1"
add_definitions("-DCURL_CA_EMBED")
add_custom_command(
OUTPUT "tool_ca_embed.c"
- COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mk-file-embed.pl" --var curl_ca_embed < "${CURL_CA_EMBED}" > "tool_ca_embed.c"
+ COMMAND "${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/mk-file-embed.pl" --var curl_ca_embed
+ < "${CURL_CA_EMBED}" > "tool_ca_embed.c"
DEPENDS
"${CURL_CA_EMBED}"
"${CMAKE_CURRENT_SOURCE_DIR}/mk-file-embed.pl"