Giter Site home page Giter Site logo

Comments (11)

memsharded avatar memsharded commented on July 21, 2024 1

Yes, exactly, the CLion plugin uses the cmake-conan integration, so this is why I moved this to this project.

from cmake-conan.

jcar87 avatar jcar87 commented on July 21, 2024 1

Hi @rturrado - thanks for reporting this. This is listed as one of the current limitations in the Readme, however we are currently working to implement support for this in #626

from cmake-conan.

jcar87 avatar jcar87 commented on July 21, 2024 1

Indeed we have :) Thanks for reporting these things - little by little this integration is proving to be robust :D

from cmake-conan.

memsharded avatar memsharded commented on July 21, 2024

Hi @rturrado

Thanks for your report.

I am not sure what would be the difference. What command line without CLion are you using?

The main difference could be if using the CMakeToolchain somehow, but if you are using CMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" in the command line, it should behave the same.

If you are using conan install + cmake --preset on the command line, that would explain, because the presets use the generated conan_toolchain.cmake and that toolchain defines the necessary paths so find_program() finds executables.

from cmake-conan.

rturrado avatar rturrado commented on July 21, 2024

Hi @memsharded ,

Thanks for your quick reply. For the command line, I'm just building with conan build . <profile(s)> -b missing. For example:

conan build . -pr:a=conan/profiles/tests-debug -b missing

from cmake-conan.

memsharded avatar memsharded commented on July 21, 2024

That explains the behavior.

The conan build uses the full CMakeToolchain with the conan_toolchain.cmake, etc, that contains those paths so find_program() is found.

So this would be a cmake-conan issue, if it is possible or not to have find_program() work for tool-requires transparently.

To reproduce, you can run in the command line with -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES argument, and it should be the same, so not specifically a CLion plugin issue.

I am moving this to cmake-conan repo, thanks.

from cmake-conan.

memsharded avatar memsharded commented on July 21, 2024

@jcar87 maybe we want to consider adding CMAKE_PROGRAM_PATH definition to the provider?

from cmake-conan.

rturrado avatar rturrado commented on July 21, 2024

Actually, I also do self.requires("tree-gen/1.0.6").

Excuse me, how can I pass that -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES on to conan build?

from cmake-conan.

memsharded avatar memsharded commented on July 21, 2024

Excuse me, how can I pass that -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES on to conan build?

It is not passed to Conan, but to cmake -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=...

from cmake-conan.

rturrado avatar rturrado commented on July 21, 2024

Well, this command line indeed reproduces the issue:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="conan_provider.cmake" -DCONAN_HOST_PROFILE="default;auto-cmake;/mnt/e/Programacion/code/c++/libqasm/conan/profiles/tests-debug-compat" -DLIBQASM_BUILD_TESTS=ON -DLIBQASM_COMPAT=ON -DASAN_ENABLED=OFF

I basically copied what I had in the CLion CMake settings (see screenshot attached), and added the CMAKE_BUILD_TYPE.

CLionCMakeSettings

Thanks for your help @memsharded !

from cmake-conan.

rturrado avatar rturrado commented on July 21, 2024

Many thanks guys! Great work. I also noticed (quite some time ago) that you had fixed another issue I was experiencing with the CLion Conan plugin (the one that forced you to comment out the deps = CMakeDeps(self); deps.generate() lines in def generate(self) in conanfile.py).

from cmake-conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.