Closed jimon closed 9 years ago
So it looked like this :
build obj(*): auto app/src/*.cpp lib/src/ecs/*.cpp lib/src/graphic/*.cpp lib/src/utils/*.cpp lib/src/systems/*.cpp
includedirs = lib/inc lib/src app/src
build app(helloworld): auto obj(*)
filter system: Darwin
cxxflags = -std=c++11
ldflags = -fobjc-arc -framework Foundation -framework CoreVideo -framework Cocoa -framework IOKit -framework OpenGL
libs = objc png GLEW glfw3
Not sure if we need transformer for -framework
part, maybe it's just enough to document it.
Though we do need to add -std=c++11
as standard flag :)
C++11 flag is added in #77
I vote for frw transformer :) so I could list libs, frameworks and flags separately. Maybe the transformer could then pick the right framework flag depending on the compiler?
Vincent Cogne
On 14 Oct 2015, at 22:12, Dmytro Ivanov notifications@github.com wrote:
So it looked like this :
build obj(): auto app/src/.cpp lib/src/ecs/.cpp lib/src/graphic/.cpp lib/src/utils/.cpp lib/src/systems/.cpp includedirs = lib/inc lib/src app/src build app(helloworld): auto obj(*)
filter system: Darwin cxxflags = -std=c++11 ldflags = -fobjc-arc -framework Foundation -framework CoreVideo -framework Cocoa -framework IOKit -framework OpenGL libs = objc png GLEW glfw3 Not sure if we need transformer for -framework part, maybe it's just enough to document it.
Though we do need to add -std=c++11 as standard flag :)
— Reply to this email directly or view it on GitHub.
Let's just add it to the core as it's tedious to define it every time I want to build something for OSX.
Maybe target specific flags would speedup the link and compile time, because then I could link CoreVideo framework on targets that need it only.
Actually target specific flags are necessary when it comes to generate code coverage reports and static analysis because they usually require that you add one or two compile flags to the compiler (-fprofile-arcs -ftest-coverage for clang) and the linker (--coverage for clang).
@xpac27 For this one you can use filters :
filter coverage: true toolset: clang
cxxflags += --fprofile-arcs -ftest-coverage
ldflags += --coverage
build *.obj: auto *.cpp
Frameworks were added in #80
@xpac27 tested frameworks in his app, it worked just fine, let's wait until he will push his manifest and see if we can simplify it.