Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
f73b09cd
Commit
f73b09cd
authored
Mar 15, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert changes in wscript file
parent
bbcc7ffc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
28 deletions
+10
-28
wscript
+10
-28
No files found.
wscript
View file @
f73b09cd
...
@@ -5,12 +5,10 @@ from waflib.Build import BuildContext, CleanContext, \
...
@@ -5,12 +5,10 @@ from waflib.Build import BuildContext, CleanContext, \
# Unix flags
# Unix flags
CFLAGS_UNIX = ["-O2", "-Wall", "-Wextra"]
CFLAGS_UNIX = ["-O2", "-Wall", "-Wextra"]
CFLAGS_UNIX_DBG = ['-g']
CFLAGS_UNIX_DBG = ['-g']
CFLAGS_UNIX_PED = ['-pedantic', '-Werror']
# Windows MSVC flags
# Windows MSVC flags
CFLAGS_WIN32_COMMON = ['/TC', '/W4', '/nologo', '/Zi']
CFLAGS_WIN32_COMMON = ['/TC', '/W4', '/
WX', '/
nologo', '/Zi']
CFLAGS_WIN32_RELEASE = ['/O2', '/MD']
CFLAGS_WIN32_RELEASE = ['/O2', '/MD']
CFLAGS_WIN32_PED = ['/Wx']
# Note: /RTC* cannot be used with optimization on.
# Note: /RTC* cannot be used with optimization on.
CFLAGS_WIN32_DBG = ['/Od', '/RTC1', '/RTCc', '/DEBUG', '/MDd']
CFLAGS_WIN32_DBG = ['/Od', '/RTC1', '/RTCc', '/DEBUG', '/MDd']
...
@@ -33,10 +31,9 @@ PPC optimized version (ppc) or the SHA1 functions from OpenSSL (openssl)")
...
@@ -33,10 +31,9 @@ PPC optimized version (ppc) or the SHA1 functions from OpenSSL (openssl)")
help='Select target architecture (ia64, x64, x86, x86_amd64, x86_ia64)')
help='Select target architecture (ia64, x64, x86, x86_amd64, x86_ia64)')
opt.add_option('--without-sqlite', action='store_false', default=True,
opt.add_option('--without-sqlite', action='store_false', default=True,
dest='use_sqlite', help='Disable sqlite support')
dest='use_sqlite', help='Disable sqlite support')
opt.add_option('--strict', action='store_true', default=False,
help='Max warning level; treat warnings as errors')
def configure(conf):
def configure(conf):
# load the MSVC configuration flags
# load the MSVC configuration flags
if conf.options.msvc:
if conf.options.msvc:
conf.env['MSVC_VERSIONS'] = ['msvc ' + conf.options.msvc]
conf.env['MSVC_VERSIONS'] = ['msvc ' + conf.options.msvc]
...
@@ -46,35 +43,20 @@ def configure(conf):
...
@@ -46,35 +43,20 @@ def configure(conf):
# default configuration for C programs
# default configuration for C programs
conf.load('compiler_c')
conf.load('compiler_c')
debug = conf.options.debug
dbg = conf.options.debug
pedantic = conf.options.strict
if conf.env.CC_NAME == 'msvc':
conf.env.CFLAGS = CFLAGS_WIN32_COMMON
conf.env.LINKFLAGS = CFLAGS_WIN32_L
if debug:
conf.env.CFLAGS += CFLAGS_WIN32_DEBUG
conf.env.LINKFLAGS += CFLAGS_WIN32_L_DBG
else:
conf.env.CFLAGS += CFLAGS_WIN32_RELEASE
if pedantic:
conf.ENV.CFLAGS += CFLAGS_WIN32_PED
elif conf.env.CC_NAME == 'gcc':
conf.env.CFLAGS = CFLAGS_UNIX
if debug:
conf.env.CFLAGS += CFLAGS_UNIX_DBG
if pedantic:
conf.env.CFLAGS += CFLAGS_UNIX_PED
conf.env.CFLAGS = CFLAGS_UNIX + (CFLAGS_UNIX_DBG if dbg else [])
# Win32 Platform: MinGW and MSVC
if conf.env.DEST_OS == 'win32':
if conf.env.DEST_OS == 'win32':
conf.env.PLATFORM = 'win32'
conf.env.PLATFORM = 'win32'
if conf.env.CC_NAME == 'msvc':
conf.env.CFLAGS = CFLAGS_WIN32_COMMON + \
(CFLAGS_WIN32_DBG if dbg else CFLAGS_WIN32_RELEASE)
conf.env.LINKFLAGS += CFLAGS_WIN32_L + \
(CFLAGS_WIN32_L_DBG if dbg else [])
conf.env.DEFINES += ['WIN32', '_DEBUG', '_LIB']
conf.env.DEFINES += ['WIN32', '_DEBUG', '_LIB']
# Unix-like platforms: Linux, Darwin, Cygwin, *BSD, etc
else:
else:
conf.env.PLATFORM = 'unix'
conf.env.PLATFORM = 'unix'
conf.check_cc(lib='pthread', uselib_store='pthread')
conf.check_cc(lib='pthread', uselib_store='pthread')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment