Skip to content

Commit

Permalink
linted gyp files
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Sep 15, 2018
1 parent fb19d93 commit 07297b9
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 54 deletions.
20 changes: 10 additions & 10 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
'includes': [ 'deps/common.gypi' ],
'includes': ['deps/common.gypi'],
'targets': [
{
'target_name': 'better_sqlite3',
'dependencies': [
'deps/sqlite3.gyp:sqlite3'
'deps/sqlite3.gyp:sqlite3',
],
'cflags': [
'-std=c++11'
'-std=c++11',
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11',
'-stdlib=libc++'
'-stdlib=libc++',
],
},
'sources': [
'src/better_sqlite3.cpp'
]
'src/better_sqlite3.cpp',
],
},
{
'target_name': 'test_extension',
'dependencies': [
'deps/sqlite3.gyp:action_before_build'
'deps/sqlite3.gyp:action_before_build',
],
'cflags_cc': [
'-Wno-unused-value',
],
'sources': [
'deps/test_extension.c'
]
'deps/test_extension.c',
],
},
]
],
}
34 changes: 17 additions & 17 deletions deps/common.gypi
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
{
'variables': {
'sqlite_version%': '3240000'
'sqlite_version%': '3250000',
},
'target_defaults': {
'default_configuration': 'Release',
'msbuild_toolset': '',
'configurations': {
'Debug': {
'defines!': [
'NDEBUG'
'NDEBUG',
],
'cflags_cc!': [
'-O3',
'-Os',
'-DNDEBUG'
'-DNDEBUG',
],
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS!': [
'-O3',
'-Os',
'-DDEBUG'
'-DDEBUG',
],
'GCC_OPTIMIZATION_LEVEL': '0',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES'
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'YES',
},
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1
}
}
'ExceptionHandling': 1,
},
},
},
'Release': {
'defines': [
'NDEBUG'
'NDEBUG',
],
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'OTHER_CPLUSPLUSFLAGS!': [
'-Os',
'-O2'
'-O2',
],
'GCC_OPTIMIZATION_LEVEL': '3',
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES'
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
},
'msvs_settings': {
'VCCLCompilerTool': {
'ExceptionHandling': 1
}
}
}
}
}
'ExceptionHandling': 1,
},
},
},
},
},
}
Binary file removed deps/sqlite-autoconf-3240000.tar.gz
Binary file not shown.
61 changes: 34 additions & 27 deletions deps/sqlite3.gyp
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
{
'includes': [ 'common.gypi' ],
'includes': ['common.gypi'],
'target_defaults': {
'default_configuration': 'Release',
'cflags': [
'-std=c99'
'-std=c99',
],
'xcode_settings': {
'OTHER_CFLAGS': [
'-std=c99'
'-std=c99',
],
},
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG', 'SQLITE_ENABLE_API_ARMOR'],
'defines': [
'DEBUG',
'_DEBUG',
'SQLITE_ENABLE_API_ARMOR',
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 1, # static debug
},
},
},
'Release': {
'defines': [ 'NDEBUG' ],
'defines': [
'NDEBUG',
],
'msvs_settings': {
'VCCLCompilerTool': {
'RuntimeLibrary': 0, # static release
},
},
}
},
},
'msvs_settings': {
'VCCLCompilerTool': {
},
'VCLibrarianTool': {
},
'VCCLCompilerTool': {},
'VCLibrarianTool': {},
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
},
},
'conditions': [
['OS == "win"', {
'defines': [
'WIN32'
'WIN32',
],
}]
}],
],
},

Expand All @@ -55,32 +59,35 @@
{
'action_name': 'unpack_sqlite_dep',
'inputs': [
'./sqlite-autoconf-<@(sqlite_version).tar.gz'
'./sqlite-autoconf-<@(sqlite_version).tar.gz',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c',
],
'action': [
'python',
'./extract.py',
'./sqlite-autoconf-<@(sqlite_version).tar.gz',
'<(SHARED_INTERMEDIATE_DIR)',
],
'action': ['python','./extract.py','./sqlite-autoconf-<@(sqlite_version).tar.gz','<(SHARED_INTERMEDIATE_DIR)']
}
},
],
'direct_dependent_settings': {
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/',
]
'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/'],
},
},
{
'target_name': 'sqlite3',
'type': 'static_library',
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/' ],
'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/'],
'dependencies': [
'action_before_build'
'action_before_build',
],
'sources': [
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c'
'<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/sqlite3.c',
],
'direct_dependent_settings': {
'include_dirs': [ '<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/' ]
'include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/sqlite-autoconf-<@(sqlite_version)/'],
},
'cflags_cc': [
'-Wno-unused-value',
Expand All @@ -98,11 +105,11 @@
'SQLITE_USE_URI=1',
'SQLITE_DEFAULT_CACHE_SIZE=-16000',
'SQLITE_DEFAULT_FOREIGN_KEYS=1',
'SQLITE_DEFAULT_WAL_SYNCHRONOUS=1'
'SQLITE_DEFAULT_WAL_SYNCHRONOUS=1',
],
'export_dependent_settings': [
'action_before_build',
]
}
]
],
},
],
}

0 comments on commit 07297b9

Please sign in to comment.