conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
966 stars 1.77k forks source link

[package] winflexbison/*: recipe should not declare "compiler" and "build_type" settings. #15139

Open nick-schultz opened 1 year ago

nick-schultz commented 1 year ago

Description

I don't think winflexbison should be sensitive to compiler or build_type settings.

It's a build tool that should generally be used as a release build. The problem is when using a Debug build profile, it will use the debug builds of the winflexbison tools.

In the conan guide, it gives an example for nasm tool. In this example it is senstive only to os and arch

class NasmConan(ConanFile):
    name = "nasm"
    version = "2.13.02"
    license = "BSD-2-Clause"
    url = "https://github.com/conan-io/conan-center-index"
    settings = "os", "arch"
    description="Nasm for windows. Useful as a build_require."

Can we get equivalent behavior for winflexbison ?

Package and Environment Details

N/A

Conan profile

A workaround is to add additional settings for winflexbison to set build_type and compiler.runtime_type to Release in our debug build profile.

debug build profile:

[settings]
os=Windows
arch=x86_64
compiler=msvc
compiler.runtime=dynamic
compiler.runtime_type=Debug
compiler.version=192
compiler.cppstd=14
build_type=Debug

winflexbison*:build_type=Release
winflexbison*:compiler.runtime_type=Release

[build_requires]
winflexbison/2.5.24

Steps to reproduce

N/A

Logs

N/A

SpaceIm commented 1 year ago

compiler should be removed in package id, but not build type. See https://github.com/conan-io/conan-center-index/issues/3157

SpaceIm commented 1 year ago

Otherwise, if you always want release build in your tools requirements, you can always call conan install with -s:b build_type=Release.