Author: ivan
Date: Thu Jul  9 13:53:04 2026
New Revision: 1936026

Log:
cmake: Make cmake_minimum_required() and cmake_policy() first directives.
The cmake_minimum_required should be the first directive in the file [1].

[1]: https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html

* CMakeLists.txt
  (): Move cmake_minimum_required() and cmake_policy() begin of the file.

Modified:
   subversion/trunk/CMakeLists.txt

Modified: subversion/trunk/CMakeLists.txt
==============================================================================
--- subversion/trunk/CMakeLists.txt     Thu Jul  9 13:13:06 2026        
(r1936025)
+++ subversion/trunk/CMakeLists.txt     Thu Jul  9 13:53:04 2026        
(r1936026)
@@ -19,6 +19,21 @@
 # CMakeLists.txt -- configuration file for CMake build system
 #
 
+# CMAKE_MINIMUM_REQUIRED should be the first directive in the file:
+# https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
+cmake_minimum_required(VERSION 3.14)
+
+# CMP0092: MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
+if(POLICY CMP0092)
+  cmake_policy(SET CMP0092 NEW)
+endif()
+
+# Enable support for MSVC runtime library selection by abstraction
+# if supported by CMake.
+if(POLICY CMP0091)
+  cmake_policy(SET CMP0091 NEW)
+endif()
+
 function(read_version path var major minor patch)
   get_filename_component(path ${path} ABSOLUTE)
 
@@ -39,19 +54,6 @@ function(read_version path var major min
   endif()
 endfunction()
 
-cmake_minimum_required(VERSION 3.14)
-
-# CMP0092: MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
-if(POLICY CMP0092)
-  cmake_policy(SET CMP0092 NEW)
-endif()
-
-# Enable support for MSVC runtime library selection by abstraction
-# if supported by CMake.
-if(POLICY CMP0091)
-  cmake_policy(SET CMP0091 NEW)
-endif()
-
 read_version(
   "subversion/include/svn_version.h" SVN_VERSION
   SVN_VER_MAJOR SVN_VER_MINOR SVN_VER_PATCH

Reply via email to