svn commit: r1919746 - /subversion/branches/cmake/CMakeLists.txt

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <[email protected]>
Author: rinrab
Date: Thu Aug  8 14:22:50 2024
New Revision: 1919746

URL: http://svn.apache.org/viewvc?rev=1919746&view=rev
Log:
On the 'cmake' branch: Setup some policies for UseSWIG module.

- CMP0078 [1]: If this policy is OLD, the names of the SWIG targets will
               start with underscore, so other commands would not work
               with plain names and it will warn.

- CMP0086 [2]: Doesn't change the behavior, but prevents warning.

[1] https://cmake.org/cmake/help/latest/policy/CMP0078.html
[2] https://cmake.org/cmake/help/latest/policy/CMP0086.html

Modified:
    subversion/branches/cmake/CMakeLists.txt

Modified: subversion/branches/cmake/CMakeLists.txt
URL: http://svn.apache.org/viewvc/subversion/branches/cmake/CMakeLists.txt?rev=1919746&r1=1919745&r2=1919746&view=diff
==============================================================================
--- subversion/branches/cmake/CMakeLists.txt (original)
+++ subversion/branches/cmake/CMakeLists.txt Thu Aug  8 14:22:50 2024
@@ -43,6 +43,19 @@ if(POLICY CMP0092)
   cmake_policy(SET CMP0092 NEW)
 endif()
 
+# CMP0078: UseSWIG generates standard target names.
+if(POLICY CMP0078)
+  cmake_policy(SET CMP0078 NEW)
+else()
+  # Otherwise, setup this behavior manually.
+  set(UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
+endif()
+
+# CMP0086: UseSWIG honors SWIG_MODULE_NAME via -module flag.
+if(POLICY CMP0086)
+  cmake_policy(SET CMP0086 NEW)
+endif()
+
 read_version(
   "subversion/include/svn_version.h" SVN_VERSION
   SVN_VER_MAJOR SVN_VER_MINOR SVN_VER_PATCH
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.