POSIX portability
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4291 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
54062c79b9
commit
9dc50cf8d5
2 changed files with 13 additions and 4 deletions
|
@ -13,11 +13,18 @@ required = Split("""
|
||||||
mmap.cpp
|
mmap.cpp
|
||||||
""")
|
""")
|
||||||
|
|
||||||
libs = Split("""
|
cppunitlibs = Split("""
|
||||||
cppunit
|
cppunit
|
||||||
""")
|
""")
|
||||||
|
|
||||||
Import('env')
|
extralibs = Split("""
|
||||||
|
dl
|
||||||
|
""")
|
||||||
|
|
||||||
|
Import('env AddAvailableLibs')
|
||||||
|
|
||||||
|
# Use available libraries
|
||||||
|
AddAvailableLibs(env, extralibs)
|
||||||
|
|
||||||
# compile using msvcrt (that's how cppunit.lib is built)
|
# compile using msvcrt (that's how cppunit.lib is built)
|
||||||
if 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS']:
|
if 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS']:
|
||||||
|
@ -28,7 +35,7 @@ env.Append(CCFLAGS = ['$EXCEPTION_FLAG'])
|
||||||
|
|
||||||
# test for CppUnit
|
# test for CppUnit
|
||||||
conf = env.Configure()
|
conf = env.Configure()
|
||||||
cppunit = conf.CheckLibWithHeader(libs, 'cppunit/extensions/HelperMacros.h', 'C++')
|
cppunit = conf.CheckLibWithHeader(cppunitlibs, 'cppunit/extensions/HelperMacros.h', 'C++')
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
||||||
if cppunit:
|
if cppunit:
|
||||||
|
@ -44,7 +51,7 @@ if cppunit:
|
||||||
required_obj.append(o)
|
required_obj.append(o)
|
||||||
|
|
||||||
# build test program
|
# build test program
|
||||||
tests = env.Program(target, tests + required_obj, LIBS = libs)
|
tests = env.Program(target, tests + required_obj)
|
||||||
|
|
||||||
# alias running the test to 'test'
|
# alias running the test to 'test'
|
||||||
test = env.Alias('test-code', [tests], tests[0].abspath)
|
test = env.Alias('test-code', [tests], tests[0].abspath)
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
using namespace std; // for std::min
|
||||||
|
|
||||||
int g_display_errors = 1;
|
int g_display_errors = 1;
|
||||||
FILE *g_output = stderr;
|
FILE *g_output = stderr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue