On 09/16/2015 03:00 PM, Stephen Kelly wrote:
> I ran cmake with -DCMAKE_CXX_FLAGS=-std=c++11.
> 
> The result is that a default of 11 is computed (with my branch) for the 
> CXX_STANDARD_DEFAULT because of the CMAKE_CXX_FLAGS=-std=c++11,

Right.  I forgot that we honor CMAKE_<LANG>_FLAGS for the compiler id:

 
http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CMakeDetermineCompilerId.cmake;hb=v3.3.1#l24

That eliminates my concern.  The use of multiple flags is not a big
problem because the right one wins, and the user did ask for the "loser"
to be there even though the project knows how to add the latter.

>  -std=c++11   -std=gnu++11
> 
> appears instead, which is consistent with the design of CompileFeatures. 
> Arguably the -std=gnu++11 should not be added in that case, but changing 
> that existing behavior would be a different topic.

Yes, and it can be done later if found to be necessary.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to