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

Components support for cmake_find_package_multi generator #7259



Copy link

@danimtb danimtb commented Jun 26, 2020

Changelog: Feature: Support components for cmake_find_package_multi generator.
Docs: conan-io/docs#1755

#TAGS: slow

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@danimtb danimtb added this to the 1.27 milestone Jun 26, 2020
@danimtb danimtb self-assigned this Jun 26, 2020
$<$<CONFIG:RelWithDebInfo>:{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_OPTIONS_LIST_RELWITHDEBINFO}' }}>
$<$<CONFIG:MinSizeRel>:{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_OPTIONS_LIST_MINSIZEREL}' }}>
$<$<CONFIG:Debug>:{{ '${'+pkg_name+'_'+comp_name+'_COMPILE_OPTIONS_LIST_DEBUG}' }}>)
set({{ pkg_name }}_{{ comp_name }}_TARGET_PROPERTIES TRUE)
Copy link
Member Author

@danimtb danimtb Jun 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a trick to "replace" the global target when a component with the global name already exists

@danimtb danimtb marked this pull request as ready for review Jun 29, 2020
@danimtb danimtb requested review from memsharded and jgsogo Jun 29, 2020
Copy link
Member Author

danimtb commented Jun 29, 2020

I see there are some tests failing only on Mac, so I can't reproduce the behavior from my end 😕

Copy link

jgsogo commented Jun 29, 2020

Running locally in Mac, this is the horror picture: not deterministic, probably race conditions with the underlying filesystem.

Having a look to failing test basic_test, and inspecting the output, I can see differences between runs (these are outputs from the conan build fake_test_package calls for the Debug build):

> cmake --build '/private/var/folders/fc/6mvcrc952dqcjfhl4c7c11ph0000gn/T/tmp8ml_ubcfconans/path with spaces' '--' '-j1'
Scanning dependencies of target example
[100%] Built target example
> cmake --build '/private/var/folders/fc/6mvcrc952dqcjfhl4c7c11ph0000gn/T/tmp7c0000jyconans/path with spaces' '--' '-j1'
Scanning dependencies of target example
[ 50%] Building CXX object CMakeFiles/example.dir/example.cpp.o
[100%] Linking CXX executable bin/example
[100%] Built target example

Adding a sleep before running the Debug section always works... you can try to generate the example in a different folder based on the build_type.

jgsogo approved these changes Jun 30, 2020
@danimtb danimtb assigned memsharded and unassigned danimtb Jun 30, 2020
@memsharded memsharded merged commit e34a52b into conan-io:develop Jun 30, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

[feature] Components: POC components in the cmake generator
3 participants