summaryrefslogtreecommitdiff
path: root/gyp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-24 17:39:18 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-24 17:44:51 +0200
commit0e928b5204ad5e2a8cfc1dd1a993396be0bd9d87 (patch)
tree1eca3f4f0446c07c38d93049d48a6272b2c989d6 /gyp
parentd299e580886353e0813d30f9dee74639f899924a (diff)
downloadqtlocation-mapboxgl-0e928b5204ad5e2a8cfc1dd1a993396be0bd9d87.tar.gz
make tests work
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common.gypi49
-rw-r--r--gyp/platform-linux.gypi1
-rw-r--r--gyp/platform.gypi16
3 files changed, 66 insertions, 0 deletions
diff --git a/gyp/common.gypi b/gyp/common.gypi
new file mode 100644
index 0000000000..89a82fbdb9
--- /dev/null
+++ b/gyp/common.gypi
@@ -0,0 +1,49 @@
+{
+ 'target_defaults': {
+ 'default_configuration': 'Release',
+ 'conditions': [
+ ['OS=="mac"', {
+ 'xcode_settings': {
+ 'CLANG_CXX_LIBRARY': 'libc++',
+ 'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
+ 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
+ 'GCC_ENABLE_CPP_RTTI':'YES',
+ 'OTHER_CPLUSPLUSFLAGS': [ '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions' ],
+ 'GCC_WARN_PEDANTIC': 'YES',
+ 'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE',
+ },
+ }],
+ ['OS=="linux"', {
+ 'cflags_cc': [
+ '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin.
+ '-Wno-literal-suffix', # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61653
+ ],
+ }],
+ ],
+ 'cflags_cc': [ '-std=c++11', '-Werror', '-Wall', '-Wextra', '-Wshadow', '-frtti', '-fexceptions' ],
+ 'configurations': {
+ 'Debug': {
+ 'cflags_cc': [ '-g', '-O0', '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ],
+ 'defines': [ 'DEBUG' ],
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '0',
+ 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
+ 'DEAD_CODE_STRIPPING': 'NO',
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO',
+ 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common']
+ }
+ },
+ 'Release': {
+ 'cflags_cc': [ '-O3' ],
+ 'defines': [ 'NDEBUG' ],
+ 'xcode_settings': {
+ 'GCC_OPTIMIZATION_LEVEL': '3',
+ 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
+ 'DEAD_CODE_STRIPPING': 'YES',
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'NO'
+ }
+ },
+ },
+ }
+}
diff --git a/gyp/platform-linux.gypi b/gyp/platform-linux.gypi
index 4288def7fc..9126652a7e 100644
--- a/gyp/platform-linux.gypi
+++ b/gyp/platform-linux.gypi
@@ -44,6 +44,7 @@
'libraries': [
'<@(uv_libraries)',
'<@(curl_libraries)',
+ '-lboost_regex',
]
}]
]
diff --git a/gyp/platform.gypi b/gyp/platform.gypi
new file mode 100644
index 0000000000..605f3d7127
--- /dev/null
+++ b/gyp/platform.gypi
@@ -0,0 +1,16 @@
+{
+ 'conditions': [
+ ['platform == "osx"', {
+ 'includes': ['platform-osx.gypi'],
+ 'variables': { 'platform_library': 'mapboxgl-osx' },
+ }],
+ ['platform == "ios"', {
+ 'includes': ['platform-ios.gypi'],
+ 'variables': { 'platform_library': 'mapboxgl-ios' },
+ }],
+ ['platform == "linux"', {
+ 'includes': ['platform-linux.gypi'],
+ 'variables': { 'platform_library': 'mapboxgl-linux' },
+ }],
+ ],
+}