Skip to content

Components support for cmake_find_package_multi generator - #7259

Merged
memsharded merged 10 commits into
conan-io:developfrom
danimtb:feature/components_cmake_find_package_multi
Jun 30, 2020
Merged

memsharded merged 10 commits into
conan-io:developfrom
danimtb:feature/components_cmake_find_package_multi

Conversation

@danimtb

@danimtb danimtb commented Jun 26, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

Comment thread conans/client/generators/cmake_find_package_multi.py Outdated
@danimtb
danimtb marked this pull request as ready for review June 29, 2020 15:09
@danimtb
danimtb requested review from jgsogo and memsharded June 29, 2020 15:09
@danimtb

danimtb commented Jun 29, 2020

Copy link
Copy Markdown
Member Author

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

@jgsogo

jgsogo commented Jun 29, 2020

Copy link
Copy Markdown
Contributor

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):

----Running------
> cmake --build '/private/var/folders/fc/6mvcrc952dqcjfhl4c7c11ph0000gn/T/tmp8ml_ubcfconans/path with spaces' '--' '-j1'
-----------------
Scanning dependencies of target example
[100%] Built target example
----Running------
> 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Components: POC components in the cmake generator

3 participants