File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -2,30 +2,24 @@ cmake_minimum_required(VERSION 3.0)
22
33# Package Management using Hunter
44include ("cmake/HunterGate.cmake" )
5-
6- if ( WIN32 AND ( MSVC_TOOLSET_VERSION LESS 140 ) )
7- # Visual Studio < 2015
8- # GTest 1.8.0
9- HunterGate(
10- URL "https://github.com/cpp-pm/hunter/archive/v0.23.222.tar.gz"
11- SHA1 "0b88baaa2a9a35b8ce632c57ade66be8dd918afd"
12- )
13- set ( GTEST_MAIN GTest::main )
14- else ()
15- # GTest 1.8.1
16- HunterGate(
17- URL "https://github.com/cpp-pm/hunter/archive/v0.23.224.tar.gz"
18- SHA1 "18e57a43efc435f2e1dae1291e82e42afbf940be"
19- )
20- set ( GTEST_MAIN GTest::gtest_main )
21- endif ()
5+ HunterGate(
6+ URL "https://github.com/cpp-pm/hunter/archive/v0.23.224.tar.gz"
7+ SHA1 "18e57a43efc435f2e1dae1291e82e42afbf940be"
8+ LOCAL
9+ )
2210
2311project (HttpStatusCodesTests)
2412
2513set (CMAKE_CXX_STANDARD 11)
2614
2715hunter_add_package(GTest)
2816find_package (GTest CONFIG REQUIRED)
17+ message ( "GTest_VERSION: ${GTest_VERSION} " )
18+ if ( GTest_VERSION VERSION_LESS "1.9.0" )
19+ set ( GTEST_MAIN GTest::main )
20+ else ()
21+ set ( GTEST_MAIN GTest::gtest_main )
22+ endif ()
2923
3024enable_testing ()
3125
Original file line number Diff line number Diff line change 1+
2+ if ( WIN32 AND ( MSVC_TOOLSET_VERSION LESS 140 ) )
3+ # Visual Studio < 2015
4+ hunter_config( GTest VERSION 1.8.0-hunter-p11 )
5+ else ()
6+ hunter_config( GTest VERSION 1.8.1 ) # Actually, this results in GTest version 1.9.0
7+ endif ()
You can’t perform that action at this time.
0 commit comments