Author: rinrab
Date: Sun Jul 14 17:11:07 2024
New Revision: 1919223
URL: http://svn.apache.org/viewvc?rev=1919223&view=rev
Log:
On the 'cmake' branch: Group all options into one section near the start of
the CMakeLists.txt file.
Before, all the CMake options and settings were somewhere in the
CMakeLists.txt near the place they are used in. This commit declares
them in a single group which improves the readability.
* CMakeLists.txt: Group the options.
Modified:
subversion/branches/cmake/CMakeLists.txt
Modified: subversion/branches/cmake/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1919223&r1=1919222&r2=1919223&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Sun Jul 14 17:11:07 2024
@@ -53,7 +53,33 @@ project("Subversion"
LANGUAGES C
)
+### Options
+
+# Build components
option(SVN_BUILD_SVNXX "Enable compilation of the C++ bindings (requires C++)"
OFF)
+option(SVN_BUILD_PROGRAMS "Build Subversion programs (such as svn.exe)" ON)
+option(SVN_BUILD_TOOLS "Build Subversion tools" OFF)
+option(SVN_BUILD_TESTS "Build Subversion test-suite" OFF)
+
+# Enable modules and features
+option(SVN_ENABLE_RA_LOCAL "Enable Subversion Local Repository Access Library"
ON)
+option(SVN_ENABLE_RA_SERF "Enable Subversion HTTP/WebDAV Protocol Repository
Access Library" OFF)
+option(SVN_ENABLE_RA_SVN "Enable Subversion SVN Protocol Repository Access
Library" ON)
+option(SVN_ENABLE_FS_FS "Enable Subversion FSFS Repository Filesystem Library"
ON)
+option(SVN_ENABLE_FS_X "Enable Subversion FSX Repository Filesystem Library"
ON)
+option(SVN_ENABLE_NLS "Enable gettext functionality" OFF)
+
+# Configuration
+option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
+option(SVN_BUILD_SHARED_FS "Build shared FS modules" ${BUILD_SHARED_LIBS})
+option(SVN_BUILD_SHARED_RA "Build shared RA modules" OFF)
+option(SVN_DEBUG "Enables specific features for developer builds" OFF)
+
+# Dependecies
+option(SVN_USE_INTERNAL_LZ4 "Use internal version of lz4" ON)
+option(SVN_USE_INTERNAL_UTF8PROC "Use internal version of utf8proc" ON)
+option(SVN_SQLITE_USE_AMALGAMATION "Use sqlite amalgamation" ON)
+set(SQLiteAmalgamation_ROOT "${CMAKE_SOURCE_DIR}/sqlite-amalgamation" CACHE
STRING "Directory with sqlite amalgamation")
# Require C++ compiler
if (SVN_BUILD_SVNXX)
@@ -71,54 +97,40 @@ configure_file(
"${CMAKE_CURRENT_BINARY_DIR}/svn_private_config.h"
)
-option(SVN_ENABLE_RA_LOCAL "Enable Subversion Local Repository Access Library"
ON)
if (SVN_ENABLE_RA_LOCAL)
add_compile_definitions("SVN_LIBSVN_RA_LINKS_RA_LOCAL")
endif()
-option(SVN_ENABLE_RA_SERF "Enable Subversion HTTP/WebDAV Protocol Repository
Access Library" OFF)
if (SVN_ENABLE_RA_SERF)
add_compile_definitions("SVN_LIBSVN_RA_LINKS_RA_SERF")
endif()
-option(SVN_ENABLE_RA_SVN "Enable Subversion SVN Protocol Repository Access
Library" ON)
if (SVN_ENABLE_RA_SVN)
add_compile_definitions("SVN_LIBSVN_RA_LINKS_RA_SVN")
endif()
-option(SVN_ENABLE_FS_FS "Enable Subversion FSFS Repository Filesystem Library"
ON)
if (SVN_ENABLE_FS_FS)
add_compile_definitions("SVN_LIBSVN_FS_LINKS_FS_FS")
endif()
-option(SVN_ENABLE_FS_X "Enable Subversion FSX Repository Filesystem Library"
ON)
if (SVN_ENABLE_FS_X)
add_compile_definitions("SVN_LIBSVN_FS_LINKS_FS_X")
endif()
-option(SVN_DEBUG "Enables specific features for developer builds" OFF)
if (SVN_DEBUG)
add_compile_definitions("SVN_DEBUG")
endif()
-option(SVN_BUILD_PROGRAMS "Build Subversion programs (such as svn.exe)" ON)
-option(SVN_BUILD_TOOLS "Build Subversion tools" OFF)
-option(SVN_BUILD_TESTS "Build Subversion test-suite" OFF)
-
if (SVN_BUILD_TESTS)
enable_testing()
endif()
-option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
-
-option(SVN_BUILD_SHARED_FS "Build shared FS modules" ${BUILD_SHARED_LIBS})
if(SVN_BUILD_SHARED_FS)
set(SVN_FS_BUILD_TYPE SHARED)
else()
set(SVN_FS_BUILD_TYPE STATIC)
endif()
-option(SVN_BUILD_SHARED_RA "Build shared RA modules" OFF)
if(SVN_BUILD_SHARED_RA)
set(SVN_RA_BUILD_TYPE SHARED)
else()
@@ -129,8 +141,6 @@ if(SVN_BUILD_SHARED_RA)
message(FATAL_ERROR "SVN_BUILD_SHARED_RA not yet supported")
endif()
-option(SVN_ENABLE_NLS "Enable gettext functionality" OFF)
-
# Setup modules path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake")
@@ -157,8 +167,6 @@ add_library(external-xml ALIAS expat::ex
### LZ4
-option(SVN_USE_INTERNAL_LZ4 "Use internal version of lz4" ON)
-
if(SVN_USE_INTERNAL_LZ4)
add_library(external-lz4 INTERFACE)
target_compile_definitions(external-lz4 INTERFACE "SVN_INTERNAL_LZ4")
@@ -174,8 +182,6 @@ endif()
### UTF8PROC
-option(SVN_USE_INTERNAL_UTF8PROC "Use internal version of utf8proc" ON)
-
if(SVN_USE_INTERNAL_UTF8PROC)
add_library(external-utf8proc INTERFACE)
target_compile_definitions(external-utf8proc INTERFACE
"SVN_INTERNAL_UTF8PROC")
@@ -192,11 +198,6 @@ endif()
### SQLite3
-option(SVN_SQLITE_USE_AMALGAMATION "Use sqlite amalgamation" ON)
-set(SQLiteAmalgamation_ROOT "${CMAKE_SOURCE_DIR}/sqlite-amalgamation"
- CACHE STRING "Directory with sqlite amalgamation"
-)
-
if(SVN_SQLITE_USE_AMALGAMATION)
find_package(SQLiteAmalgamation REQUIRED)
add_library(external-sqlite ALIAS SQLite::SQLite3Amalgamation)