[2] | 1 | project "nv"
|
---|
| 2 | location (_ACTION)
|
---|
[120] | 3 | language "C++"
|
---|
[2] | 4 | kind "StaticLib"
|
---|
| 5 | includedirs { "." }
|
---|
| 6 | files { "nv/**.hh", "nv/**.inl", "src/**.cc" }
|
---|
[120] | 7 | targetname "nv"
|
---|
| 8 |
|
---|
| 9 | -- injection!
|
---|
| 10 | solution( solution().name )
|
---|
| 11 | configuration "*"
|
---|
| 12 | includedirs { os.getenv("GLM_PATH") }
|
---|
| 13 | configuration "gmake"
|
---|
[121] | 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 |
|
---|
[123] | 41 | configuration "linux"
|
---|
| 42 | linkoptions { "-ldl" }
|
---|
| 43 |
|
---|
[120] | 44 | configuration "vs*"
|
---|
| 45 | defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" }
|
---|
| 46 |
|
---|
| 47 | if _ACTION == "gmake-clang" then
|
---|
| 48 | premake.gcc.cc = "clang"
|
---|
| 49 | premake.gcc.cxx = "clang++"
|
---|
| 50 | _ACTION = "gmake"
|
---|
| 51 | end
|
---|
| 52 |
|
---|
| 53 | premake.action.add {
|
---|
| 54 | trigger = "gmake-clang",
|
---|
| 55 | description = "gmake file with clang overrides, needs 'make -R' to work",
|
---|
| 56 | }
|
---|
| 57 |
|
---|
| 58 | if _ACTION == "clean" then
|
---|
| 59 | for action in premake.action.each() do
|
---|
| 60 | os.rmdir(action.trigger)
|
---|
| 61 | end
|
---|
[123] | 62 | end
|
---|