conan-io / cmake-conan

CMake wrapper for conan C and C++ package manager
MIT License
822 stars 250 forks source link

Prevent variable overwriting in nested calls to dependency provider #587

Closed jcar87 closed 11 months ago

jcar87 commented 11 months ago

We can have nested calls to find_package, which will be handled by conan_provide_dependency, which is a macro.

Any variable that we set in conan_provide_dependency will be visible by nested calls - if nested calls use the same variable names further on, then the values are rewritten. As it turns out, this is only causing issues currently as reported here: https://github.com/conan-io/cmake-conan/issues/570 - note that this PR does not fix that issue.

This PR does not change behaviour - just stylistic changes that make things more evident.

In this PR: