summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-07-20 12:17:42 +0200
committerPatrick Steinhardt <ps@pks.im>2018-08-03 09:50:35 +0200
commitad0cb297bd867882e6d84bd9e556d237b43647d8 (patch)
tree464e3aec55a2ff866dab26ec8ee821340c613ff3
parentbf3382d5448d4cb0487cc69510b6184d44e7eafc (diff)
downloadlibgit2-ad0cb297bd867882e6d84bd9e556d237b43647d8.tar.gz
cmake: fix the unholy options alignment mess
-rw-r--r--CMakeLists.txt63
1 files changed, 32 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 71a79c9a8..e39c1c812 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,37 +38,38 @@ INCLUDE(EnableWarnings)
# Build options
#
-OPTION( SONAME "Set the (SO)VERSION of the target" ON )
-OPTION( BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON )
-OPTION( THREADSAFE "Build libgit2 as threadsafe" ON )
-OPTION( BUILD_CLAR "Build Tests using the Clar suite" ON )
-OPTION( BUILD_EXAMPLES "Build library usage example apps" OFF )
-OPTION( BUILD_FUZZERS "Build the fuzz targets" OFF)
-OPTION( TAGS "Generate tags" OFF )
-OPTION( PROFILE "Generate profiling information" OFF )
-OPTION( ENABLE_TRACE "Enables tracing support" OFF )
-OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
-
-SET(SHA1_BACKEND "CollisionDetection" CACHE STRING "Backend to use for SHA1. One of Generic, OpenSSL, Win32, CommonCrypto, mbedTLS, CollisionDetection. ")
-OPTION( USE_SSH "Link with libssh to enable SSH support" ON )
-OPTION( USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON )
-OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
-OPTION( USE_SANITIZER "Enable one of the Sanitizers (requires clang)" OFF )
-OPTION( USE_COVERAGE "Enable clang's coverage report (requires clang)" OFF )
-OPTION( USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF )
-OPTION( VALGRIND "Configure build for valgrind" OFF )
-OPTION( CURL "Use curl for HTTP if available" ON)
-OPTION( USE_EXT_HTTP_PARSER "Use system HTTP_Parser if available" ON)
-OPTION( DEBUG_POOL "Enable debug pool allocator" OFF )
-OPTION( ENABLE_WERROR "Enable compilation with -Werror" OFF )
-OPTION( USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF )
+OPTION(SONAME "Set the (SO)VERSION of the target" ON)
+OPTION(BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" ON)
+OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
+OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
+OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
+OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
+OPTION(TAGS "Generate tags" OFF)
+OPTION(PROFILE "Generate profiling information" OFF)
+OPTION(ENABLE_TRACE "Enables tracing support" OFF)
+OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF)
+
+ SET(SHA1_BACKEND "CollisionDetection" CACHE STRING
+ "Backend to use for SHA1. One of Generic, OpenSSL, Win32, CommonCrypto, mbedTLS, CollisionDetection.")
+OPTION(USE_SSH "Link with libssh to enable SSH support" ON)
+OPTION(USE_HTTPS "Enable HTTPS support. Can be set to a specific backend" ON)
+OPTION(USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF)
+OPTION(USE_SANITIZER "Enable one of the Sanitizers (requires clang)" OFF)
+OPTION(USE_COVERAGE "Enable clang's coverage report (requires clang)" OFF)
+OPTION(USE_STANDALONE_FUZZERS "Enable standalone fuzzers (compatible with gcc)" OFF)
+OPTION(VALGRIND "Configure build for valgrind" OFF)
+OPTION(CURL "Use curl for HTTP if available" ON)
+OPTION(USE_EXT_HTTP_PARSER "Use system HTTP_Parser if available" ON)
+OPTION(DEBUG_POOL "Enable debug pool allocator" OFF)
+OPTION(ENABLE_WERROR "Enable compilation with -Werror" OFF)
+OPTION(USE_BUNDLED_ZLIB "Use the bundled version of zlib" OFF)
IF (UNIX AND NOT APPLE)
- OPTION( ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF )
+ OPTION(ENABLE_REPRODUCIBLE_BUILDS "Enable reproducible builds" OFF)
ENDIF()
IF (APPLE)
- OPTION( USE_ICONV "Link with and use iconv library" ON )
+ OPTION(USE_ICONV "Link with and use iconv library" ON)
ENDIF()
IF(MSVC)
@@ -78,27 +79,27 @@ IF(MSVC)
#
# If you are writing a CLR program and want to link to libgit2, you'll want
# to turn this on by invoking CMake with the "-DSTDCALL=ON" argument.
- OPTION( STDCALL "Build libgit2 with the __stdcall convention" OFF )
+ OPTION(STDCALL "Build libgit2 with the __stdcall convention" OFF)
# This option must match the settings used in your program, in particular if you
# are linking statically
- OPTION( STATIC_CRT "Link the static CRT libraries" ON )
+ OPTION(STATIC_CRT "Link the static CRT libraries" ON)
# If you want to embed a copy of libssh2 into libgit2, pass a
# path to libssh2
- OPTION( EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF )
+ OPTION(EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF)
ENDIF()
IF(WIN32)
# By default, libgit2 is built with WinHTTP. To use the built-in
# HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
- OPTION( WINHTTP "Use Win32 WinHTTP routines" ON )
+ OPTION(WINHTTP "Use Win32 WinHTTP routines" ON)
ENDIF()
IF(MSVC)
# Enable MSVC CRTDBG memory leak reporting when in debug mode.
- OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
+ OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
ENDIF()
FILE(STRINGS "${libgit2_SOURCE_DIR}/include/git2/version.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")