-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgtest.lua
More file actions
98 lines (80 loc) · 2.57 KB
/
Copy pathgtest.lua
File metadata and controls
98 lines (80 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
-- gtest.lua, projects:gtest, gtest_unittest
project "gtest"
-- kind is used to indicate the type of this project.
kind "StaticLib"
-- We set the location of the files Premake will generate
location "output/gtest"
language "C++"
targetdir "output/bin/%{cfg.buildcfg}"
rtti "Off"
-- The library's public headers
includedirs { "testing/gtest" }
files {
"testing/gtest/include/gtest/**.h",
"testing/gtest/src/**.cc",
"testing/multiprocess_func_list.cc",
"testing/multiprocess_func_list.h",
}
excludes { "testing/gtest/src/gtest_main.cc" }
filter "files:testing/gtest/src/gtest-all.cc"
flags { "ExcludeFromBuild" }
function addGTestDefinesAndIncludes()
filter {}
defines {
"GTEST_HAS_POSIX_RE=0",
"GTEST_LANG_CXX11=1",
"UNIT_TEST",
}
includedirs { "testing/gtest/include" }
end
addGTestDefinesAndIncludes()
function useGTestLib()
addGTestDefinesAndIncludes()
links "gtest"
end
project "gtest_main"
-- kind is used to indicate the type of this project.
kind "StaticLib"
-- We set the location of the files Premake will generate
location "output/gtest_main"
language "C++"
targetdir "output/bin/%{cfg.buildcfg}"
rtti "Off"
useGTestLib()
files {
"testing/gtest/src/gtest_main.cc"
}
function useGTestMain()
links "gtest_main"
end
project "gtest_unittest"
kind "ConsoleApp"
location "output/gtest_unittest"
language "C++"
targetname "gtest_all_test"
targetdir "output/bin/%{cfg.buildcfg}"
rtti "Off"
-- The library's public headers
includedirs { "testing/gtest" }
filter "action:vs201*"
defines {
"_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS"
}
buildoptions { "/bigobj" }
useGTestLib()
useGTestMain()
files {
"testing/gtest/test/**.h",
"testing/gtest/test/gtest-filepath_test.cc",
"testing/gtest/test/gtest-linked_ptr_test.cc",
"testing/gtest/test/gtest-message_test.cc",
"testing/gtest/test/gtest-options_test.cc",
"testing/gtest/test/gtest-port_test.cc",
"testing/gtest/test/gtest_pred_impl_unittest.cc",
"testing/gtest/test/gtest_prod_test.cc",
"testing/gtest/test/gtest-test-part_test.cc",
"testing/gtest/test/gtest-typed-test_test.cc",
"testing/gtest/test/gtest-typed-test2_test.cc",
"testing/gtest/test/gtest_unittest.cc",
"testing/gtest/test/production.cc",
}