Skip to content

tools.build:*flags documentation is confusing #3175

Description

@maksim-petukhou

For example tools.build:sharedlinkflags documentation says

List of extra flags used by CMakeToolchain for CMAKE_SHARED_LINKER_FLAGS_INIT variable

I think this is not entirely true, because I see that these extra flags are propagated to other generators too

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/microsoft/toolchain.py#L219

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/gnu/autotoolstoolchain.py#L133

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/microsoft/nmaketoolchain.py#L81

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/meson/toolchain.py#L341

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/apple/xcodetoolchain.py#L45

Or tools.build:cxxflags documentation says

List of extra CXX flags used by different toolchains like CMakeToolchain, AutotoolsToolchain and MesonToolchain

and at the same time I see that this configuration is used in MSBuildToolchain which is not mentioned

https://github.com/conan-io/conan/blob/6aa9bf6823383610ccf9abe50172eb841832c79d/conan/tools/microsoft/toolchain.py#L217

Probably not a documentation issue, but... I'm trying to build a large dependency tree, and I don't even know what *Toolchain or *Deps they use, and I want some confidence. I would like documentation to say that all my flags are just propagated without mentioning generators. If this isn't the case for some generators, a big fat red error when my linker flags aren't propagated will be a huge plus.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions