Skip to content

Commit

Permalink
Fix #3926: SCons Boost test fails with -Werror=return-type
Browse files Browse the repository at this point in the history
Based on the patch from @viy2 with a minor change.
  • Loading branch information
jyrkive committed Feb 12, 2019
1 parent 9bc6161 commit f61856f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scons/boost.py
Expand Up @@ -102,6 +102,7 @@ def CheckBoost(context, boost_lib, require_version = None, header_only = False):
test_program += """
boost::unit_test::test_suite* init_unit_test_suite ( int, char**)
{
return nullptr;
}
\n"""

Expand All @@ -112,6 +113,7 @@ def CheckBoost(context, boost_lib, require_version = None, header_only = False):
#endif
int main()
{
return 0;
}
\n"""
if context.TryLink(test_program, ".cpp"):
Expand All @@ -135,6 +137,7 @@ def CheckBoostIostreamsGZip(context):
{
boost::iostreams::filtering_stream<boost::iostreams::output> filter;
filter.push(boost::iostreams::gzip_compressor(boost::iostreams::gzip_params()));
return 0;
}
\n"""

Expand Down Expand Up @@ -165,6 +168,7 @@ def CheckBoostIostreamsBZip2(context):
{
boost::iostreams::filtering_stream<boost::iostreams::output> filter;
filter.push(boost::iostreams::bzip2_compressor(boost::iostreams::bzip2_params()));
return 0;
}
\n"""

Expand Down Expand Up @@ -203,6 +207,7 @@ def CheckBoostLocaleBackends(context, backends):
for(auto backend : backends) {
std::cout << backend << std::endl;
}
return 0;
}
\n"""

Expand Down

0 comments on commit f61856f

Please sign in to comment.