0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 17:10:48 +01:00

SERVER-9002 Fix indentation issue with compiler detection bodies

This commit is contained in:
Andrew Morrow 2013-03-23 15:30:36 -04:00
parent 1b2a4e07f2
commit 224a7bb7f6

View File

@ -21,6 +21,7 @@ import re
import shutil
import stat
import sys
import textwrap
import types
import urllib
import urllib2
@ -849,7 +850,12 @@ def doConfigure(myenv):
}
print_tuple = (lang_name, context.env[compiler_var], toolchain)
context.Message('Checking if %s compiler "%s" is %s... ' % print_tuple)
result = context.TryCompile(test_bodies[toolchain], source_suffix)
# Strip indentation from the test body to ensure that the newline at the end of the
# endif is the last character in the file (rather than a line of spaces with no
# newline), and that all of the preprocessor directives start at column zero. Both of
# these issues can trip up older toolchains.
test_body = textwrap.dedent(test_bodies[toolchain])
result = context.TryCompile(test_body, source_suffix)
context.Result(result)
return result