source: trunk/nv.lua @ 226

Last change on this file since 226 was 210, checked in by epyon, 12 years ago
  • -stdlib=libc++ messes up windows clang/gcc compilation, so it should be only set on OS X
File size: 1.8 KB
Line 
1project "nv"
2        location (_ACTION)
3        language "C++"
4        kind "StaticLib"
5        includedirs { "." }
6        files { "nv/**.hh", "nv/**.inl", "nv/**.inc", "src/**.cc" }
7        targetname "nv"
8
9-- injection!
10solution( 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--                                -- on Mac OS X don't try to use old stdc++
18--                                "-stdlib=libc++",
19                                "-Weverything",
20                                -- obviously we don't care about C++98 compatibility
21                                "-Wno-c++98-compat",
22                                -- obviously we don't care about C++98 compatibility
23                                "-Wno-c++98-compat-pedantic",
24                                -- an evil one has to embrace
25                                "-Wno-float-equal",
26                                -- padding is a non-issue at the moment
27                                "-Wno-padded",
28                                -- we don't want to list all 128 keys of the key
29                                -- enum each time, right?
30                                "-Wno-switch-enum",
31                                -- yes, we need exit time destructors for libraries
32                                "-Wno-exit-time-destructors",
33                                -- same here
34                                "-Wno-global-constructors",
35                                -- no reasonable way to fix this with abstract
36                                -- interfaces.
37                                "-Wno-weak-vtables"
38                        }
39                        --buildoptions {
40            --                    "-stdlib=libc++"
41                        --}
42                else
43                        buildoptions { "-std=c++0x" }
44                end
45
46        configuration "linux"
47                linkoptions { "-ldl" }
48
49        configuration "vs*"
50                defines { "_SECURE_SCL=0", "_CRT_SECURE_NO_WARNINGS=1" }
51
52if _ACTION == "gmake-clang" then
53        premake.gcc.cc  = "clang"
54        premake.gcc.cxx = "clang++"
55        _ACTION = "gmake"
56end
57
58premake.action.add {
59        trigger = "gmake-clang",
60        description = "gmake file with clang overrides, needs 'make -R' to work",
61}
62
63if _ACTION == "clean" then
64        for action in premake.action.each() do
65                os.rmdir(action.trigger)
66        end
67end
Note: See TracBrowser for help on using the repository browser.