Re: [CMake] Enabling C++0x support

2011-05-05 Thread Alexander Neundorf
On Wednesday 04 May 2011, Guido Winkelmann wrote:
> Hi,
> 
> Is there a way to specify, in a cross-platform compatible manner, that a
> given C++ source file (or a target or an entire project) requires support
> for C++ 0x, so that whatever compiler flags would be necessary for that

No, cmake doesn't offer such generic flags.
The only thing it has is such a generic setting for IPO optimization, but I 
think that's about it.

Alex
___
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 CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Enabling C++0x support

2011-05-04 Thread Sean McBride
On Wed, 4 May 2011 23:58:56 +0200, Guido Winkelmann said:

>Is there a way to specify, in a cross-platform compatible manner, that a
>given 
>C++ source file (or a target or an entire project) requires support for C
>++ 0x, 
>so that whatever compiler flags would be necessary for that for the current 
>platform and compiler will be set?
>
>For example, when using GCC, you need to pass "-std=c++0x" as an argument to 
>the compiler in order to get C++0x support. I could just set(CMAKE_CXX_FLAGS 
>"-std=c++0x"), but that's not really portable... the current platform might 
>use a different compiler that needs a different option to enable C++ 0x and 
>won't understand "-std=c++0x", or, at some point in the future, it might
>use a 
>GCC release which makes 0x the default and does not even need a special flag.

It would indeed be nice to have such a thing.  VTK currently has a
similar problem where it passes -std=c99, a gcc flag unrecognised by clang:


-- 

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com 
Mac Software Developer  Montréal, Québec, Canada


___
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 CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Enabling C++0x support

2011-05-04 Thread Guido Winkelmann
Hi,

Is there a way to specify, in a cross-platform compatible manner, that a given 
C++ source file (or a target or an entire project) requires support for C++ 0x, 
so that whatever compiler flags would be necessary for that for the current 
platform and compiler will be set?

For example, when using GCC, you need to pass "-std=c++0x" as an argument to 
the compiler in order to get C++0x support. I could just set(CMAKE_CXX_FLAGS 
"-std=c++0x"), but that's not really portable... the current platform might 
use a different compiler that needs a different option to enable C++ 0x and 
won't understand "-std=c++0x", or, at some point in the future, it might use a 
GCC release which makes 0x the default and does not even need a special flag.

Guido
___
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 CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake