cmake: move global project definition to beginning

such that necessary cmake variables to detect Cygwin are defined
when setting the C++ standard and we can distinguish.
This commit is contained in:
Matthias Grob 2019-02-04 18:59:51 +00:00
parent 0ea2d8f8fa
commit 67265e0706

View File

@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 2.8.8)
project(googletest-distribution)
set(GOOGLETEST_VERSION 1.9.0)
if (CMAKE_VERSION VERSION_LESS "3.1")
add_definitions(-std=c++11)
else()
@ -12,9 +15,6 @@ if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
endif (POLICY CMP0048)
project(googletest-distribution)
set(GOOGLETEST_VERSION 1.9.0)
enable_testing()
include(CMakeDependentOption)