Skip to content

Avoid setting CMAKE_CXX_STANDARD explicitly in libraries #44

Open
@traversaro

Description

@traversaro

In abseil/abseil-cpp#259 (comment) , a good point is made against setting CMAKE_CXX_STANDARD explicitly in libraries, in favor of just using target_compile_features(mylib PUBLIC cxx_std_11) to specify the minimum required standard language to compile.
We never set the CMAKE_CXX_STANDARD in this tutorial, but as the use of setting CMAKE_CXX_STANDARD is widespread in robotology libraries, it would be good to have one point where we discuss this. Requiring CMake 3.10 would be a good occasion to switch to use target_compile_features(mylib PUBLIC cxx_std_11).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions