On 2013-02-19 18:36, Brad Bell wrote:
My goal is to use some new c++11 features if they are available,
otherwise to stick to the c++03 features. I need to build test programs
that check for correctness as well as distribute an include file library.

In general, you should test for specific features that you want to use, as they may be available on compilers that don't claim C++11 compliance (e.g. MSVC, g++ with -std=c++0x).

I would write a simple test program per feature and use try_compile to see if the feature can be used. Then use configure_file and #cmakedefine to generate a header file with feature test symbols that you can use in your real code.

--
Matthew

--

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

Reply via email to