-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[package] any: CMake Header-only package with a compiler
setting fail to build on Windows
#1957
Comments
@Minimonium I guess the other settings like |
@danimtb Well, CMake detects a default compiler and picks up an unrelated to profile configuration, for example in my case it's a Release x64 despite me having a Debug x86. In normal use of CMake, even for header-only libraries, it'd be a problem (unless using a void hack) because CMake produces fixed to a configuration config files, which would fail to be detected. But CCI removes them. The only issue may arise if a header-only project does some conditional file generation depending on the configuration. |
is this a big deal? I believe you always can set @danimtb @jgsogo do you think we should merge all these PRs? for me it sounds like we have a bug around https://github.com/conan-io/conan/blob/c923c692fb14dd3ad0a66bab308b4a59f6a037dc/conans/client/build/cmake.py#L159 |
I think all the packages affected are already merged, right? Will this problem raise if we run |
Yep! Thank you a lot. @SSE4 We do have a bug in the toolchain detection, but I'm not sure how to properly handle it to not make a timebomb for a recipe that would need some other information later on or another change in the codebase that would render any workaround useless. I also don't think that having a condition to have an env variable for a recipe to properly work on a fairly popular platform like Windows MSVC is a good solution. |
I think this issue would've been fixed (because CCI would've failed) if this PR were in place: conan-io/conan#7327 |
@jgsogo Indeed! Also, I think that this issue may be closed now since all the recipes affected were merged. If anyone wants to proceed with the discussion - feel free to open the issue. |
CMake build helper on Windows uses settings to determine which CMake generator to use.
In older Conan versions the behavior was a failure in configure step, but since that, it seems to be fixed for the default case, so I failed to properly double-check that. My apologizes.
If there are no settings in a recipe - Conan delegates the generator detection to CMake.
It may be a problem in some cases but I've failed to reproduce it (/cc @theodelrieu ):
If a package requires a
compile
setting for some unrelated work as a C++ standard support detection - it fails to configure the project because of faulty logic in here:https://github.com/conan-io/conan/blob/develop/conans/client/build/cmake.py#L158
Affected recipes:
#1946
#1945
#1939
#1936
/cc @Croydon @SSE4
Profile
Example to reproduce
Result
The text was updated successfully, but these errors were encountered: