C++11 Support?

Hi All,

Has anyone played with enabling GCC's C++11 support in any of the Cxx-based plugins? I'm not that familure with ant (I normamly use Make to build my C/C++ code), so I'm not sure how one would go about editing the GCC compiler flags to include the C++11 build options.

Thanks,
Andy Sayler

Groups:

Comments

Stephen Edwards

We're now running g++ v4.8.2

We're now running g++ v4.8.2 with -std=c++11 on the main VT server.  The modifications aren't hard.  Once they've seen a bit more use here, I'll update the distributed version of the C++ plugin to do this.  In the mean time, feel free to ask for details if anyone wants to do this on a separate server.

Stephen Edwards

We've only had a very small

We've only had a very small number of requests for C++11, and truthfully haven't played around with it since none of our required courses at Virginia Tech use C++ anymore (the undergrad C++ courses we have aren't using C++11, either, so far).  Also, the CxxTest support (as well as the dereferee code) hasn't been tested with C++11.  In fact, we have outstanding issues with 64-bit C++ implementations for some code in the dereferee library.  Those kinds of issues make it difficult to smoothly transition.

Are you working on your own server?  If so, and if your server already has C++11 installed, then adding the compiler option to the ANT file is pretty straightfoward.  You can edit the plug-in's build.xml file.  Look for the <cc> task under the 'compile' target, and the <cc> task under the 'compileInstructorTests' target (for the CppTddPlugin; for other plug-ins, look for every <cc> task outside of any 'assert'-related target).  Just add a compiler argument to the sequence of compiler arguments that are already there, using the existing tags as a guide:

    <compilerarg value="-std=c++11"/>

The compilerarg tags appear inside the <cc> task is the order that they will appear on the command line.  The format should be easy to understand once you look for these features in build.xml.

Hope that helps, and report back on what works (or doesn't!).