conan-io / conan-io/conan-toolchains

Package visual studio compiler for use with tool_requires

Open
#1 8 comments 0 reactions 1 assignee Claimed by @memsharded View on GitHub
Dominant language
Python
Stars
8
Forks
6
PR merge metrics
No merged PRs in 30d

Description

### What is your question?

OS: windows 10
conan 1.56

I have packaged the "Visual Studio 2017" toolchain in a package and use it on the consumer side in my build profile [tool_requires].
My consumer I would then like my consumer recipe to detect and use the toolchain provided by conan like this:

```
def generate(self):
tc = CMakeToolchain(self)
tc.cache_variables["CMAKE_GENERATOR_INSTANCE"] = "[path to toolchain]"
tc.generate()
deps = CMakeDeps(self)
deps.generate()
```

[path to toolchain] points to "...2017\BuildTools" within the package as indicated by cmake.
But CMakeToolchain refuses to detect anything but the installed Visual Studio in "c:\Program Files....."
Is there a way for me to be able to force the "system" to use the visual studio compiler from my package so that other developers in my team can build without manually installing visual studio.

Regards
Klaus

### Have you read the CONTRIBUTING guide?

- [X] I've read the CONTRIBUTING guide

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.