CMake Deprecation Warning at build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.CMake (cmake_minimum_required)
翻译
在build/_deps/googletest-src/CMakeLists.txt:4 (cmake_minimum_required):与CMake < 3.10的兼容性将从CMake的未来版本中删除
CMake。
更新VERSION参数值。或者,使用…语法
告诉CMake项目至少需要,但已经更新
使用或更早版本引入的策略。CMake (cmake_minimum_required)
在Makefile.txt中要求最低Cmake版本
修改版本声明后解决:
//修改前
cmake_minimum_required (VERSION 2.8.12)
//查看系统cmake版本, cmake --version
cmake version 3.30.3
//修改后
cmake_minimum_required (VERSION 3.8.0)
或者
cmake_minimum_required (VERSION 2.8.12...3.10.0)