Mercurial > embed
comparison gtest/CMakeLists.txt @ 11:5d17168ea0af
gtest: import 1.7.0
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 22 Mar 2016 08:46:18 +0100 |
parents | |
children | b63f9c593c90 |
comparison
equal
deleted
inserted
replaced
10:7f34f88b48ba | 11:5d17168ea0af |
---|---|
1 # | |
2 # CMakeLists.txt -- googletest library | |
3 # | |
4 # Copyright (c) 2013-2016 David Demelier <markand@malikania.fr> | |
5 # | |
6 # Permission to use, copy, modify, and/or distribute this software for any | |
7 # purpose with or without fee is hereby granted, provided that the above | |
8 # copyright notice and this permission notice appear in all copies. | |
9 # | |
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
17 # | |
18 | |
19 cmake_minimum_required(VERSION 3.0) | |
20 project(GoogleTest) | |
21 | |
22 add_library(gtest src/gtest-all.cc) | |
23 | |
24 target_include_directories( | |
25 gtest | |
26 PUBLIC | |
27 ${GoogleTest_SOURCE_DIR}/include | |
28 PRIVATE | |
29 ${GoogleTest_SOURCE_DIR} | |
30 ) | |
31 | |
32 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | |
33 target_compile_options(gtest PUBLIC -Wno-missing-field-initializers -Wno-unused-variable) | |
34 endif () | |
35 | |
36 if (NOT WIN32) | |
37 target_link_libraries(gtest -pthread) | |
38 endif () |