0

use -Wdeclaration-after-statement

This makes gcc's behavior match MSVC's behavior, reducing the chances of
code not building on Windows
This commit is contained in:
Andrew Chin
2012-03-01 22:52:00 -05:00
parent 9eb2e4a85e
commit c019d7e8d8

View File

@@ -262,6 +262,12 @@ class CustomBuildExt(build_ext):
# customize the build options for this compilier
for e in self.extensions:
e.extra_link_args.append("/MANIFEST")
if c == "unix":
# customize the build options for this compilier
for e in self.extensions:
e.extra_compile_args.append("-Wdeclaration-after-statement")
e.extra_compile_args.append("-Werror=declaration-after-statement")
# build in place, and in the build/ tree
self.inplace = False