conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.3k stars 986 forks source link

Add tools.build:asmflags configuration setting for cmake toolchain #17237

Open jwidauer opened 1 month ago

jwidauer commented 1 month ago

Changelog: Feature

The CMake toolchain supports the tools.build:cflags and tools.build:cxxflags configuration settings, which then populate the CMAKE_C_FLAGS_INIT and the CMAKE_CXX_FLAGS_INIT CMake variables respectively. There doesn't seem to exist an equivalent for the CMAKE_ASM_FLAGS_INIT CMake variable in conan, right now. This PR adds the new tools.build:asmflags configuration setting, to address this.

In this PR I only included the necessary changes for the CMake toolchain, but I could also add support for this setting in some of the other toolchain generators, if there's interest.

Docs: https://github.com/conan-io/docs/pull/3881