[CMake] CXX_STANDARD use latest

Tiago Macarios tiagomacarios at gmail.com
Sat Apr 15 22:48:16 EDT 2017


Hi,

One can require a specific CXX_STANDARD to be used, but is it possible to
set a minimum and let CMake use the latest as long as it satisfies the
minimum?

Example code:

set_property(TARGET a_lib
    PROPERTY CXX_STANDARD_MIN 11
    PROPERTY CXX_STANDARD_REQUIRED ON
    PROPERTY CXX_STANDARD_LATEST ON
)

Tiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170415/155650f2/attachment.html>


More information about the CMake mailing list