Skip to content

make sure CMake doesn't pick up on system Boost in CMakeMake generic easyblock (#1618

Merged
vanzod merged 3 commits intoeasybuilders:developfrom
boegel:cmake_no_system_boost
Apr 4, 2019
Merged

make sure CMake doesn't pick up on system Boost in CMakeMake generic easyblock (#1618
vanzod merged 3 commits intoeasybuilders:developfrom
boegel:cmake_no_system_boost

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Jan 19, 2019

fix for #1608 raised by @bartoldeman

I tested this with a couple of easyconfigs that use CMakeMake and have Boost as a dependency, seems to work as expected, but more extensive testing is needed.

I also wonder whether there is a more general approach to take here, why only do this for Boost?

@boegel boegel added this to the 3.9.0 milestone Jan 19, 2019
@akesandgren
Copy link
Copy Markdown
Contributor

This only works for CmakeFiles that uses CMakes builtin search for Boost.
Good enough for most Boost related cases but there's probably not a generic approach that will work.

And there might be situations where this is the wrong thing to do.
Controlling this is really up to each individual easyconfig.

@ocaisa
Copy link
Copy Markdown
Member

ocaisa commented Jan 24, 2019

@akesandgren If it doesn't work then it is doing no harm so I think it should be on by default, but for individual easyconfigs I don't see an issue with being able to switch it off

# - instruct CMake to not search for Boost headers/libraries in other places
# - disable search for Boost CMake package configuration file
boost_root = get_software_root('Boost')
if boost_root:
Copy link
Copy Markdown
Member

@ocaisa ocaisa Jan 24, 2019

Choose a reason for hiding this comment

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

Add an option enable_system_boost with a default of false so this can be switched off in a corner case.

Also, should we care that this may only be relevant to versions of CMake that supported this functionality?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like Find_Boost goes back to 2.8.4 (oldest in EB) so should be fine

damianam
damianam previously approved these changes Mar 27, 2019
Copy link
Copy Markdown
Member

@damianam damianam left a comment

Choose a reason for hiding this comment

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

This lgtm. @boegel do you want more testing? Honestly, I think this is the correct thing to do and I see how it could fail.

@boegel boegel modified the milestones: next release (3.9.1), 3.9.0 Apr 3, 2019
…et to False by default) to allow picking up of system Boost even when Boost is listed as a dependency
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Apr 4, 2019

I've tested this quite extensively, haven't hit any problems at all, so this is good to go imho...

@boegel boegel requested a review from vanzod April 4, 2019 19:47
@vanzod vanzod merged commit 9aae6b4 into easybuilders:develop Apr 4, 2019
@boegel boegel deleted the cmake_no_system_boost branch April 5, 2019 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants