[Paraview] -std=c++11 for a single directory?
B.W.H. van Beest
bwvb at xs4all.nl
Wed Oct 1 22:43:38 EDT 2014
Triggered by your suggestion (CMake is still largely terra incognita for
me), I googled a bit, finding that your suggestion boils down to adding
set( CMAKE_CXX_FLAGS "-std=c++11" )
to the CMakeList.txt. It worked! Thanks.
Also, I was not ware of the potential incompatibilities, so thanks for
the warning.
So far I haven't encountered any issues, but it is good to be aware.
In the mean time, I hope ParaView will have the c++11 enabled soon.
The new language features are too important to be missed!
Regards,
Bertweim
On 10/01/2014 09:31 PM, Robert Maynard wrote:
> You need to force cache the CMAKE_CXX_FLAGS variable with c++11 in the
> CMakeLists.txt for the plugin.
>
> You should be aware of the potential ABI incompatibilities in the
> c++11 and c++98 libstdc++ library (
> https://gcc.gnu.org/wiki/Cxx11AbiCompatibility ). Plus the fact this
> won't work with clang as they are ABI incompatible.
>
> On Wed, Oct 1, 2014 at 2:33 PM, B.W.H. van Beest <bwvb at xs4all.nl> wrote:
>> Hi,
>>
>> For a new plugin i'm currently writing, I'm using features of c++11.
>> In order to do so, I need to specify the flag -std=c++11 to the gcc
>> compiler.
>> So far, I'm only able to achieve this by adding the flag -std=c++11 to
>> the file "flags.make" appearing in a subdirectory of CMakeFiles in the
>> *build* directory tree. This works, but this flags.cmake is overwritten
>> every time a new configuration is done (e.g. after a change in
>> CMakelist.txt).
>>
>> Where can I specify compile flags that only hold for a given directory?
>>
>> Kind Regards,
>> Bertwim
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>
More information about the ParaView
mailing list