Giter Site home page Giter Site logo

pepe82sh / conancmaketoolchaingenerator Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 21 KB

A generator for conan that can be used to build conan packages by invoking cmake instead of conan build

License: MIT License

Python 85.89% CMake 13.61% C++ 0.50%

conancmaketoolchaingenerator's People

Contributors

pepe82sh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

conancmaketoolchaingenerator's Issues

Simple example

Hi Pepe,

I'm new to Conan and I was checking out your ConanCMakeToolchainGenerator. It looks like something I have been looking for. However, I am not able to set up a simple example.
Using your source, I use the command "conan create . wo/testing.
However, it fails in some way in the testing stage.

  • I had to change the arm-none-eabi-gcc_installer package to one built by myself
  • It gives the error "CONAN_CMAKE_TOOLCHAIN_FILE was expected but not set." which I can fix through setting the profile "conan create . wo/testing --profile=cross. However, I would also like it to work when not setting a profile. How would I do this?
  • Then I get the error "CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set.". I'm not sure why this happens, since the package ninja_installer/1.9.0@bincrafters/stable is included in the build_requires. I don't find the conan docs sufficient on this, so I might be doing something wrong.

It would be very helpful to write down an example, instead of only the CMakeLists file you give now, with for example a project that includes one main file and one dependency. That would really help.

Kind regards.

Wouter Oosterbeek

failing test

When I run
conan create . demo/testing -s compiler=gcc -s compiler.libcxx=libstdc++ -s
compiler.version=5.4

I get:
cmake_toolchain_generator/0.1@demo/testing (test package): ERROR: Generator CmakeToolchain(file:conan_toolchain.cmake) failed
'HelloTestConan' object has no attribute 'install_folder'
ERROR: 'HelloTestConan' object has no attribute 'install_folder'

I'm not sure where this comes from?

[edit]
It seems that CMakeDefinitionsBuilder get_definitions is using the install folder.

Automatically include CONAN_CMAKE_TOOLCHAIN_FILE

This might seem silly, considering this generates toolchain files, but I think it would be helpful for the auto-generated toolchain file to include CONAN_CMAKE_TOOLCHAIN_FILE if the environment variable is provided.

This would allow toolchains providers who need to run additional cmake steps to include them in the CONAN_CMAKE_TOOLCHAIN_FILE, which will then help ensure that building via cmake and building via conan are the same.

In my use case, I would like to add:
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
conan-io/conan#4706

PS: thanks for making this toolchain generator is been very helpful

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.