Hey folks, This patch needs a review of somebody who understands XS and C++. Vladimir's done what looks to me like good work and I'd like to incorporate it so he does more.
It's a small amount of change and shouldn't take long to look over. https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/pull/45 Schwern On 2/17/13 11:51 AM, Vladimir Timofeev wrote: > 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.