From 60cf03313da2bf615cbc5c535105afb7aa310431 Mon Sep 17 00:00:00 2001 From: Knut Omang Date: Sat, 10 Feb 2018 11:23:48 +0100 Subject: [PATCH] Set gtest version correctly for older cmake versions Signed-off-by: Knut Omang --- googletest/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index e33718b1..6e42c5c6 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -40,8 +40,12 @@ endif() # as ${gtest_SOURCE_DIR} and to the root binary directory as # ${gtest_BINARY_DIR}. # Language "C" is required for find_package(Threads). + +# Project version: + if (CMAKE_VERSION VERSION_LESS 3.0) project(gtest CXX C) + set(PROJECT_VERSION ${GOOGLETEST_VERSION}) else() cmake_policy(SET CMP0048 NEW) project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)