[#1543] Fix missing C++11 flag for building python bindings
* Extract the flags from CXX and put into CXXFLAGS which is passed into setup.py extra_compile_args. * Remove now redundant os.environ test in setup.py
This commit is contained in:
parent
df6cb6a48d
commit
9b30d09099
|
@ -1 +1 @@
|
|||
-I@top_srcdir@/include @COMPILETIME_OPTIONS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @OPENSSL_INCLUDES@
|
||||
-I@top_srcdir@/include @COMPILETIME_OPTIONS@ @CXXFLAGS@ @CPPFLAGS@ @BOOST_CPPFLAGS@ @OPENSSL_INCLUDES@
|
||||
|
|
|
@ -112,13 +112,6 @@ else:
|
|||
extra_link = flags.parse(ldflags)
|
||||
extra_compile = flags.parse(extra_cmd)
|
||||
|
||||
# for some reason distutils uses the CC environment variable to determine
|
||||
# the compiler to use for C++
|
||||
if 'CXX' in os.environ:
|
||||
os.environ['CC'] = os.environ['CXX']
|
||||
if 'CXXFLAGS' in os.environ:
|
||||
os.environ['CFLAGS'] = os.environ['CXXFLAGS']
|
||||
|
||||
ext = [Extension('libtorrent',
|
||||
sources = source_list,
|
||||
language='c++',
|
||||
|
|
|
@ -123,6 +123,8 @@ AS_ECHO "Checking for boost libraries:"
|
|||
AX_BOOST_BASE([1.54])
|
||||
|
||||
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
|
||||
# Also put any flags added to CXX into CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS $(echo "$CXX" | cut -d ' ' -f 2-)"
|
||||
|
||||
AX_BOOST_SYSTEM()
|
||||
AS_IF([test -z "$BOOST_SYSTEM_LIB"],
|
||||
|
|
Loading…
Reference in New Issue