Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Conan not working ootb #28

Closed
inql opened this issue Sep 29, 2021 · 3 comments
Closed

[BUG] Conan not working ootb #28

inql opened this issue Sep 29, 2021 · 3 comments
Assignees
Labels
acknowledged The issue is being worked on bug Something isn't working fixed Bug has been fixed and the fix tested

Comments

@inql
Copy link

inql commented Sep 29, 2021

Describe the bug
After installing conan with pip and enabling conan support for project, several things are not working properly:

  1. ${PROJECT_NAME}_CONAN_REQUIRES and ${PROJECT_NAME}_CONAN_OPTIONS are not being detected.
  2. When detected, libraries are not linked so, compilation is failing (tested with boost only)

Already managed to fix that, so you can apply that @filipdutescu:

  1. For first issue, just replace ${CONAN_REQUIRES} with ${${PROJECT_NAME}_CONAN_REQUIRES} in Conan.cmake - just a typo :) apply same for ${CONAN_OPTIONS}
  2. For second, conan_basic_setup() needs to be called within Conan.cmake.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repo
  2. Install conan via pip
  3. Enable conan in cmake/StandardSettings.cmake
  4. Add dependency in cmake/Conan.cmake, like set(${PROJECT_NAME}_CONAN_REQUIRES "boost/1.77.0")
  5. Use the library somewhere in example project, like #include <boost/archive/text_oarchive.hpp> in include/project/tmp.hpp
  6. Build the project, enjoy the compilation error.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows] Ubuntu
  • Version [e.g. 10] 20.04

Additional context
Add any other context about the problem here.

@inql inql added the bug Something isn't working label Sep 29, 2021
@filipdutescu filipdutescu self-assigned this Sep 30, 2021
@filipdutescu filipdutescu added the acknowledged The issue is being worked on label Sep 30, 2021
@filipdutescu
Copy link
Owner

Hello, @inql! Thank's very much for finding and reporting this bug. Many thanks are also due for providing a fix as well, making my life easy 😀. I have pushed the fixed, hopefully it works as intended. I would be grateful if you could test it out (4b6ae29) just to confirm everything works as expected.

@filipdutescu filipdutescu added the fixed Bug has been fixed and the fix tested label Sep 30, 2021
@inql
Copy link
Author

inql commented Sep 30, 2021

Everything works like a charm 😄
But you should also check on .workflows as they seem not to support conan (at least for ubuntu, needed to add it by myself).
I could apply some changes, but I'm not sure if I can contribute :)

@filipdutescu
Copy link
Owner

You can always make a PR and we can discuss the changes you wish to see. However I would like to keep the actions as generic as possible (i.e. if you want to use Conan I assume you also know how to change the actions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged The issue is being worked on bug Something isn't working fixed Bug has been fixed and the fix tested
Projects
None yet
Development

No branches or pull requests

2 participants