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

[question] cmake packages are dependent on compiler? #2752

Open
DukeOfKirkcaldy opened this issue Sep 1, 2020 · 3 comments
Open

[question] cmake packages are dependent on compiler? #2752

DukeOfKirkcaldy opened this issue Sep 1, 2020 · 3 comments
Labels
question Further information is requested

Comments

@DukeOfKirkcaldy
Copy link

I am trying to switch to the new cmake/*@ packages after the deprecation of cmake_installer/*@conan/stable packages.

I expected that I could just grab any pre-built package compatible with my build machine (os=Windows and arch=x86_64).

However, it seems that since the package_id is also affected by the compiler, I am forced to build from sources using my own compiler. The problem here is that my profile sets up my toolchain to cross-compile for an embedded device, and so the build will fail...

I'd like to know if this is intended behavior and what I should do in this case.

@DukeOfKirkcaldy DukeOfKirkcaldy added the question Further information is requested label Sep 1, 2020
@DukeOfKirkcaldy
Copy link
Author

I am working around it by forcing the settings of a pre-built package I found on conan-center

[settings]
cmake/*:compiler=Visual Studio
cmake/*:compiler.runtime=MT
cmake/*:compiler.version=14
cmake/*:build_type=Release

@SpaceIm
Copy link
Contributor

SpaceIm commented Sep 1, 2020

I've also noticed that most of the recent recipes intended to be mainly used as build_requirements (m4, pkgconf, cmake, libtool, ninja for example) have compiler, build_type, os and arch in their package id, instead of just arch_build and os_build.
It's really a waste of time to have to build those executables in debug mode or when using MinGW (even worse with MinGW, because it might fail), while we could just download pre build release binary of arch/os build plaform.

@madebr
Copy link
Contributor

madebr commented Sep 1, 2020

The reason for keeping the compiler and build_type is that some people want to run cmake in debug mode and only have a specific mscrt installed.
Removing it from package_id would enable conflicts between debug and non-debug.

This thread shows the reasoning: #1783
See this comment: #1783 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants