Set gtest version correctly for older cmake versions
Signed-off-by: Knut Omang <knut.omang@oracle.com>
This commit is contained in:
parent
9a502a5b14
commit
60cf03313d
|
@ -40,8 +40,12 @@ endif()
|
||||||
# as ${gtest_SOURCE_DIR} and to the root binary directory as
|
# as ${gtest_SOURCE_DIR} and to the root binary directory as
|
||||||
# ${gtest_BINARY_DIR}.
|
# ${gtest_BINARY_DIR}.
|
||||||
# Language "C" is required for find_package(Threads).
|
# Language "C" is required for find_package(Threads).
|
||||||
|
|
||||||
|
# Project version:
|
||||||
|
|
||||||
if (CMAKE_VERSION VERSION_LESS 3.0)
|
if (CMAKE_VERSION VERSION_LESS 3.0)
|
||||||
project(gtest CXX C)
|
project(gtest CXX C)
|
||||||
|
set(PROJECT_VERSION ${GOOGLETEST_VERSION})
|
||||||
else()
|
else()
|
||||||
cmake_policy(SET CMP0048 NEW)
|
cmake_policy(SET CMP0048 NEW)
|
||||||
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user