1 | project "nv"
|
---|
2 | location (_ACTION)
|
---|
3 | language "C++"
|
---|
4 | kind "StaticLib"
|
---|
5 | includedirs { "." }
|
---|
6 | files { "nv/**.hh", "nv/**.inl", "src/**.cc" }
|
---|
7 | targetname "nv"
|
---|
8 |
|
---|
9 | -- injection!
|
---|
10 | solution( solution().name )
|
---|
11 | configuration "*"
|
---|
12 | includedirs { os.getenv("GLM_PATH") }
|
---|
13 | configuration "gmake"
|
---|
14 | if _ACTION == "gmake-clang" then
|
---|
15 | buildoptions {
|
---|
16 | "-std=c++11",
|
---|
17 | "-Weverything",
|
---|
18 | -- obviously we don't care about C++98 compatibility
|
---|
19 | "-Wno-c++98-compat",
|
---|
20 | -- obviously we don't care about C++98 compatibility
|
---|
21 | "-Wno-c++98-compat-pedantic",
|
---|
22 | -- an evil one has to embrace
|
---|
23 | "-Wno-float-equal",
|
---|
24 | -- padding is a non-issue at the moment
|
---|
25 | "-Wno-padded",
|
---|
26 | -- we don't want to list all 128 keys of the key
|
---|
27 | -- enum each time, right?
|
---|
28 | "-Wno-switch-enum",
|
---|
29 | -- yes, we need exit time destructors for libraries
|
---|
30 | "-Wno-exit-time-destructors",
|
---|
31 | -- same here
|
---|
32 | "-Wno-global-constructors",
|
---|
33 | -- no reasonable way to fix this with abstract
|
---|
34 | -- interfaces.
|
---|
35 | "-Wno-weak-vtables"
|
---|
36 | }
|
---|
37 | else
|
---|
38 | buildoptions { "-std=c++0x" }
|
---|
39 | end
|
---|
40 |
|
---|
41 | configuration "vs*"
|
---|
42 | defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" }
|
---|
43 |
|
---|
44 | if _ACTION == "gmake-clang" then
|
---|
45 | premake.gcc.cc = "clang"
|
---|
46 | premake.gcc.cxx = "clang++"
|
---|
47 | _ACTION = "gmake"
|
---|
48 | end
|
---|
49 |
|
---|
50 | premake.action.add {
|
---|
51 | trigger = "gmake-clang",
|
---|
52 | description = "gmake file with clang overrides, needs 'make -R' to work",
|
---|
53 | }
|
---|
54 |
|
---|
55 | if _ACTION == "clean" then
|
---|
56 | for action in premake.action.each() do
|
---|
57 | os.rmdir(action.trigger)
|
---|
58 | end
|
---|
59 | end |
---|