Brad King wrote:
> Later CMake learns about the -std=c++11 flag for that compiler and
> honors the CXX_STANDARD request by passing it. Now the compiler
> has its extensions disabled and the project fails to build. This
> was due to an update in CMake, not the project.
Is the same problem present with CMAKE_*_COMPILE_OPTIONS_{PIE,PIC,DLL} ?
> We need a way for a project to say that it should not build unless
> CMake knows how to nominally enable support for the given language
> level.
This requirement is inconsistent with what people keep asking me for (namely
something like what the qmake CONFIG += c++11 does - enable a c++11 flag if
known, and do nothing if not), and is inconsistent with the decay- topic.
I think it be determined with code equivalent to
if (target->GetProperty("CXX_STANDARD" == std::string("11")
&& !makefile->GetDefinition("CMAKE_CXX11_STANDARD_COMPILE_OPTION"))
{
// FATAL_ERROR
}
We would need to know the compile options of compilers supported by existing
versions of CMake, and ensure that the option is recorded for new
CompilerIds and new releases of existing compiler ids too.
However, I guess two different interfaces are needed if you want to ensure
the 'require some notion of C++11' concept.
Thanks,
Steve.
--
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/cgi-bin/mailman/listinfo/cmake-developers