mirror of https://github.com/auygun/kaliber.git
41 lines
589 B
Plaintext
41 lines
589 B
Plaintext
config("compiler_defaults") {
|
|
if (current_os == "linux") {
|
|
cflags = [
|
|
"-fPIC",
|
|
"-pthread",
|
|
"-g",
|
|
]
|
|
|
|
cflags_cc = [
|
|
"-std=c++17",
|
|
"-I../../src",
|
|
]
|
|
}
|
|
}
|
|
|
|
config("executable_ldconfig") {
|
|
ldflags = [
|
|
"-Wl,-rpath=\$ORIGIN/",
|
|
"-Wl,-rpath-link=",
|
|
]
|
|
}
|
|
|
|
config("debug") {
|
|
defines = [ "_DEBUG" ]
|
|
|
|
if (current_os == "linux") {
|
|
if (current_cpu == "x64") {
|
|
defines += [ "_GLIBCXX_DEBUG=1" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
config("release") {
|
|
cflags = []
|
|
defines = [ "NDEBUG" ]
|
|
|
|
if (current_os == "linux") {
|
|
cflags += [ "-Ofast" ]
|
|
}
|
|
}
|