Hi, please review pull request
https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/45

This patch make suffix of target for .xs file processing configurable
(defaults .c as before). But now we really can make process .xs files
to .cpp (for example) to support C++.

Before this change I found two methods to work with C++ in .xs (both
are defective in some ways):
1. Use CC=>'g++' parameter.
Bad, because C++ compiler not always gcc (it may be clang, microsoft
compiler or any other).
2. Use CCFLAGS with "-x c++" it at least works for gcc and clang (may
be in others...)
Also not portable...

Both solutions will not work if module has mix of .c and .cpp files...
because .c files also will be processed as c++

Solution with custom subclassing of EUMM works, but it is very ugly
(see my post about
https://plus.google.com/110578993733685478222/posts/fvisV7ktDtd )

So I propose to remove hardcode of .c suffix of xs targets and make it
configurable. It is small change, but will make life of C++ module
writers math easy.

--
Vladimir Timofeev <vovk...@gmail.com>

Reply via email to