use FlagsConfigure for -pthread
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4587 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7430499571
commit
bc76613d85
1 changed files with 3 additions and 22 deletions
|
@ -190,29 +190,10 @@ conf.Finish()
|
|||
# instead of -lpthread.
|
||||
#
|
||||
|
||||
def check_pthread(ctx):
|
||||
ctx.Message('Checking for -pthread... ')
|
||||
Import('FlagsConfigure')
|
||||
|
||||
last_flags = ctx.env['LINKFLAGS']
|
||||
|
||||
ctx.env.Append(LINKFLAGS = '-pthread')
|
||||
|
||||
test = """
|
||||
int __main() {
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
||||
result = not ctx.TryLink(test, '.c')
|
||||
ctx.Result(result)
|
||||
|
||||
ctx.env.Replace(LINKFLAGS = last_flags)
|
||||
|
||||
return result
|
||||
|
||||
conf = defenv.Configure(custom_tests = { 'CheckPThread' : check_pthread })
|
||||
if conf.CheckPThread():
|
||||
makensis_env.Append(LINKFLAGS = '-pthread')
|
||||
conf = FlagsConfigure(makensis_env)
|
||||
conf.CheckLinkFlag('-pthread')
|
||||
conf.Finish()
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue