scons:reformat the custom boost and mapnik version checking cpp snippets, since on gcc 4.1.1 the existing formatting was causing 'no newline at end of file' warnings
This commit is contained in:
parent
af3fa7dc76
commit
feb3f3327c
1 changed files with 31 additions and 24 deletions
55
SConstruct
55
SConstruct
|
@ -296,13 +296,15 @@ def CheckBoost(context, version, silent=False):
|
||||||
if not silent:
|
if not silent:
|
||||||
context.Message('Checking for Boost version >= %s... ' % (version))
|
context.Message('Checking for Boost version >= %s... ' % (version))
|
||||||
ret = context.TryRun("""
|
ret = context.TryRun("""
|
||||||
#include <boost/version.hpp>
|
|
||||||
|
|
||||||
int main()
|
#include <boost/version.hpp>
|
||||||
{
|
|
||||||
return BOOST_VERSION >= %d ? 0 : 1;
|
int main()
|
||||||
}
|
{
|
||||||
""" % version_n, '.cpp')[0]
|
return BOOST_VERSION >= %d ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
""" % version_n, '.cpp')[0]
|
||||||
if silent:
|
if silent:
|
||||||
context.did_show_result=1
|
context.did_show_result=1
|
||||||
context.Result(ret)
|
context.Result(ret)
|
||||||
|
@ -310,15 +312,18 @@ def CheckBoost(context, version, silent=False):
|
||||||
|
|
||||||
def GetBoostLibVersion(context):
|
def GetBoostLibVersion(context):
|
||||||
ret = context.TryRun("""
|
ret = context.TryRun("""
|
||||||
#include <boost/version.hpp>
|
|
||||||
#include <iostream>
|
#include <boost/version.hpp>
|
||||||
|
#include <iostream>
|
||||||
int main()
|
|
||||||
{
|
int main()
|
||||||
std::cout << BOOST_LIB_VERSION << std::endl;
|
{
|
||||||
return 0;
|
|
||||||
}
|
std::cout << BOOST_LIB_VERSION << std::endl;
|
||||||
""", '.cpp')
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
""", '.cpp')
|
||||||
# hack to avoid printed output
|
# hack to avoid printed output
|
||||||
context.did_show_result=1
|
context.did_show_result=1
|
||||||
context.Result(ret[0])
|
context.Result(ret[0])
|
||||||
|
@ -326,15 +331,17 @@ def GetBoostLibVersion(context):
|
||||||
|
|
||||||
def GetMapnikLibVersion(context):
|
def GetMapnikLibVersion(context):
|
||||||
ret = context.TryRun("""
|
ret = context.TryRun("""
|
||||||
#include <mapnik/version.hpp>
|
|
||||||
#include <iostream>
|
#include <mapnik/version.hpp>
|
||||||
|
#include <iostream>
|
||||||
int main()
|
|
||||||
{
|
int main()
|
||||||
std::cout << MAPNIK_VERSION << std::endl;
|
{
|
||||||
return 0;
|
std::cout << MAPNIK_VERSION << std::endl;
|
||||||
}
|
return 0;
|
||||||
""", '.cpp')
|
}
|
||||||
|
|
||||||
|
""", '.cpp')
|
||||||
# hack to avoid printed output
|
# hack to avoid printed output
|
||||||
context.did_show_result=1
|
context.did_show_result=1
|
||||||
context.Result(ret[0])
|
context.Result(ret[0])
|
||||||
|
|
Loading…
Reference in a new issue