2012-12-30 11:40:53 Václav Šmilauer napisał(a): > I am compiling an extension consisting of a number of files; some of > them are c++11, some are plain C. The compiler (gcc) detects language by > extension, not whether the g++/gcc binary is called. I am passing > "-std=c++11" to the compiler because of c++ files. *.c files are > correctly treated as plain C by the compiler and it says: > > cc1.exe: warning: command-line option '-std=c++11' is valid for > C++/ObjC++ but not for C [enabled by default] > > I don't mind seeing that warning, but I would be concerned should it > become an error at some point in the future. > > As far as I see, the current design supposes the whole extension is a > single language, and single set of compiler flags. Is there a way around it?
See my patches for distutils: http://bugs.python.org/issue1222585 Use -std=c++11 only in variables specific to C++ (e.g. CXXFLAGS). -- Arfrever Frehtes Taifersar Arahesis
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig