Commit c9371de7 by Christoph Grüninger Committed by Jesse Beder

[cmake] Require minimum CMake version 3.5

Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.
parent 28f93bde
# 3.5 is actually available almost everywhere, but this a good minimum. # 3.5 is actually available almost everywhere.
# 3.14 as the upper policy limit avoids CMake deprecation warnings. # 3.30 as the upper policy limit avoids CMake deprecation warnings.
cmake_minimum_required(VERSION 3.4...3.14) cmake_minimum_required(VERSION 3.5...3.30)
# enable MSVC_RUNTIME_LIBRARY target property # enable MSVC_RUNTIME_LIBRARY target property
# see https://cmake.org/cmake/help/latest/policy/CMP0091.html # see https://cmake.org/cmake/help/latest/policy/CMP0091.html
......
...@@ -3,7 +3,6 @@ find_package(Threads REQUIRED) ...@@ -3,7 +3,6 @@ find_package(Threads REQUIRED)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
set(BUILD_MOCK ON CACHE BOOL "" FORCE) set(BUILD_MOCK ON CACHE BOOL "" FORCE)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
if(YAML_USE_SYSTEM_GTEST) if(YAML_USE_SYSTEM_GTEST)
find_package(GTest) find_package(GTest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment