Improve:cmake warning.

This commit is contained in:
Fancy code 2024-05-25 17:40:12 +08:00
parent 8c5eee015d
commit ce1cbbb9b4
3 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,8 @@ set(CMAKE_SYSTEM_PROCESSOR arm)
# Version of the system
set(CMAKE_SYSTEM_VERSION 1)
cmake_policy(SET CMP0011 NEW)
cmake_policy(SET CMP0005 NEW)
add_definitions(-Wall -O2 -Os)
add_definitions(-Wno-unused-local-typedefs)

View File

@ -17,7 +17,7 @@ if [ ! -f "./googletest-release-1.11.0/googlemock/lib/libgtest.a" ] || [ ! -f ".
rm CMakeCache.txt CMakeFiles/ cmake_install.cmake Makefile lib/ -rf
case $platform in
"linux")
echo "==Compile linux."
echo "==Compile gtest linux."
cmake -DCMAKE_TOOLCHAIN_FILE=$PLATFORM_PATH/build/cmake/toolchain/linux.toolchain.cmake .
make
;;

View File

@ -45,7 +45,7 @@ if (CMAKE_VERSION VERSION_LESS 3.0)
project(gmock CXX C)
else()
cmake_policy(SET CMP0048 NEW)
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
project(gmock VERSION 1.11.0 LANGUAGES CXX C)
endif()
cmake_minimum_required(VERSION 2.8.12)