pepe82sh / conancmaketoolchaingenerator Goto Github PK
View Code? Open in Web Editor NEWA generator for conan that can be used to build conan packages by invoking cmake instead of conan build
License: MIT License
A generator for conan that can be used to build conan packages by invoking cmake instead of conan build
License: MIT License
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.
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
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.
FYI: It looks like conan is starting to support a feature like this natively: https://docs.conan.io/en/1.32/creating_packages/toolchains/cmake.html
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.