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: <http://vtk.org/Bug/view.php?id=11952> -- ____________________________________________________________ Sean McBride, B. Eng s...@rogue-research.com Rogue Research www.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