[cmake-developers] Wrong cxx-extension flags

Brad King brad.king at kitware.com
Thu Jul 14 14:36:43 EDT 2016


On 07/14/2016 01:59 PM, Kornel Benko wrote:
> I was trying to compile lyx with QT5.7.
> ...
> found that the flags in the flag.cmake files were mismatched.
> 
> Therefore I started searching, where the extra ' --std=gnu++11' came
> from, and found it in Modules/Compiler/GNU-CXX.cmake.

It appears there but only in a table.  Other settings are required
to get the table entry to be used.  See the CXX_STANDARD target
property:

 https://cmake.org/cmake/help/v3.6/prop_tgt/CXX_STANDARD.html

Unless you or the project is setting that (perhaps via the
CMAKE_CXX_STANDARD variable) then CMake won't add any flags.

In lyx I see the

 development/cmake/modules/FindCXX11Compiler.cmake

source file that adds such flags.  Please ask them about it.

-Brad



More information about the cmake-developers mailing list