Author: rinrab
Date: Wed Jul 10 13:13:18 2024
New Revision: 1919096
URL: http://svn.apache.org/viewvc?rev=1919096&view=rev
Log:
On the 'cmake' branch: Setup LANGUAGES field when calling project() command
to make C++ compile as not required dependency.
* CMakeLists.txt
(project): Prepare which languages we need to build for the current
configuration and record to the `languages' local variable, setup
LANGUAGES field of the project, move SVN_BUILD_SVNXX option here
because it is used when preparing languages.
(SVNXX): Move SVN_BUILD_SVNXX option up to project section.
Modified:
subversion/branches/cmake/CMakeLists.txt
Modified: subversion/branches/cmake/CMakeLists.txt
URL:
http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1919096&r1=1919095&r2=1919096&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Wed Jul 10 13:13:18 2024
@@ -48,8 +48,22 @@ read_version(
SVN_VER_MAJOR SVN_VER_MINOR SVN_VER_PATCH
)
+option(SVN_BUILD_SVNXX "Enable compilation of the C++ bindings (requires C++)"
OFF)
+
+# Only plain C compiler is needed by default
+set(languages C)
+
+# Require C++ compiler
+if (SVN_BUILD_SVNXX)
+ # TODO: Also add SVN_BUILD_AUTH_KWALLET and SVN_BUILD_JAVAHL to the
+ # conditions when they done.
+
+ list(APPEND languages CXX)
+endif()
+
project("Subversion"
VERSION "${SVN_VERSION}"
+ LANGUAGES ${languages}
)
string(TOLOWER "${CMAKE_HOST_SYSTEM_PROCESSOR}-${CMAKE_HOST_SYSTEM_NAME}"
SVN_BUILD_HOST)
@@ -295,8 +309,6 @@ endif()
include("build/cmake/targets.cmake")
-option(SVN_BUILD_SVNXX "Enable compilation of the C++ bindings (requires C++)"
OFF)
-
if (SVN_BUILD_SVNXX)
target_include_directories(libsvnxx PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/subversion/bindings/cxx/include"