conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
58 stars 34 forks source link

conan install ignores build type setting from conanfile #191

Closed Bernhard-L closed 6 months ago

Bernhard-L commented 3 years ago

I'm using the conan extension in visual studio (MSBuild) configuration. and have an alternative build type "Debug with Tests".

The automatic install process uses this build type to install the packages. I tried setting it directly over conanfile.txt [settings] build_type=Debug

and using conanfile.py

def build_id(self): if self.settings.build_type == "Debug with Tests": self.info_build.settings.build_type = "Debug" if self.settings.build_type == "Release with Tests": self.info_build.settings.build_type = "Release"

But this is ignored by the extension and it allways calls 'install [ProjectDir]conanfile.py -g visual_studio --install-folder [ProjectDir].conan -s arch=x86_64 -s build_type="Debug with Tests" -s compiler.toolset=v142 -s compiler.version=16 -s compiler.runtime=MDd --build=missing --update'

which is naturally not supported by the packages.