-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathpremake4-test.lua
executable file
·59 lines (44 loc) · 1.57 KB
/
premake4-test.lua
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
-- A project building unit test
project "MallieTest"
kind "ConsoleApp"
language "C++"
files { gtest_sources, sources, test_sources, tinyjs_sources }
includedirs {
"./",
"deps/gtest-1.7.0/include",
"deps/gtest-1.7.0/",
"deps/parson/",
"deps/TinyThread++-1.1/source/",
"deps/tinyjs/",
}
-- defines { 'GTEST_HAS_TR1_TUPLE=0' }
-- MacOSX. Guess we use gcc.
configuration { "macosx", "gmake" }
-- gcc openmp
if _OPTIONS['with-openmp'] then
buildoptions { "-fopenmp" }
linkoptions { "-fopenmp" }
end
-- Windows specific. Assumes visual studio.
configuration { "windows" }
-- includedirs { './compat' } -- stdint.h
defines { 'NOMINMAX', '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }
defines { '__STDC_CONSTANT_MACROS', '__STDC_LIMIT_MACROS' } -- c99
-- Linux specific
configuration { "linux" }
links { "dl" }
links { "pthread" }
defines { '__STDC_CONSTANT_MACROS', '__STDC_LIMIT_MACROS' } -- c99
defines { '_LARGEFILE_SOURCE', '_FILE_OFFSET_BITS=64' }
-- gcc openmp
if _OPTIONS['with-openmp'] then
buildoptions { "-fopenmp" }
linkoptions { "-fopenmp" }
end
configuration "Debug"
defines { "DEBUG" } -- -DDEBUG
flags { "Symbols" }
targetname "test_mallie_d"
configuration "Release"
flags { "Symbols", "Optimize" }
targetname "test_mallie"