{ 'target_defaults': { 'default_configuration': 'Release', 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'CLANG_CXX_LIBRARY': 'libc++', 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'GCC_ENABLE_CPP_RTTI': 'YES', 'OTHER_CPLUSPLUSFLAGS': [ '-std=c++14', '-Werror', '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-frtti', '-fexceptions', '${CFLAGS}', ], 'GCC_WARN_PEDANTIC': 'YES', 'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE', 'MACOSX_DEPLOYMENT_TARGET': '10.10', 'ALWAYS_SEARCH_USER_PATHS': 'NO', 'COMBINE_HIDPI_IMAGES': 'YES', }, }, { 'cflags_cc': [ '-std=c++14', '-Werror', '-Wall', '-Wextra', '-Wshadow', '-Wno-variadic-macros', '-Wno-error=unused-parameter', '-frtti', '-fexceptions', '${CFLAGS}', ], }], ['OS=="linux"', { 'cflags_cc': [ '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin. ], }], ], 'target_conditions': [ ['_type == "static_library"', { 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'OTHER_CPLUSPLUSFLAGS': [ '-fPIC' ], 'SKIP_INSTALL': 'YES', }, }, { 'cflags_cc': [ '-fPIC' ], }], ], }], ], 'configurations': { 'Debug': { 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'DEBUG_INFORMATION_FORMAT': 'dwarf', 'GCC_OPTIMIZATION_LEVEL': '0', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES', 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 'DEAD_CODE_STRIPPING': 'NO', 'OTHER_CPLUSPLUSFLAGS': [ '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ], 'conditions': [ ['coverage', { 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', 'OTHER_CPLUSPLUSFLAGS': [ '--coverage' ], }], ], }, }, { 'cflags_cc': [ '-g', '-O0', '-fno-omit-frame-pointer','-fwrapv', '-fstack-protector-all', '-fno-common' ], 'conditions': [ ['coverage', { 'cflags_cc': [ '--coverage' ] }], ], }], ], 'defines': [ 'DEBUG' ], 'target_conditions': [ ['_type == "executable"', { 'conditions': [ ['OS=="mac" and coverage', { 'xcode_settings': { 'OTHER_LDFLAGS': [ '--coverage' ] }, }, { 'ldflags': [ '--coverage' ], }], ], }], ], }, 'Release': { 'defines': [ 'NDEBUG' ], 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES', 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 'DEAD_CODE_STRIPPING': 'NO', }, }, { 'cflags_cc': [ '-g', '-O3' ], }], ], }, }, }, 'configurations': { 'Debug': { 'xcode_settings': { 'ENABLE_TESTABILITY': 'YES', 'ONLY_ACTIVE_ARCH': 'YES', }, }, }, 'targets': [ { 'target_name': 'headers', 'type': 'none', 'sources': [ '