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

Simplify find_packages example #26

Closed
bast opened this issue Nov 6, 2017 · 11 comments
Closed

Simplify find_packages example #26

bast opened this issue Nov 6, 2017 · 11 comments
Assignees

Comments

@bast
Copy link
Member

bast commented Nov 6, 2017

Currently we have TBB and Armadillo but I am not sure too many participants can relate to these libraries. I am brainstorming about a simpler example where we possibly detect a package or library that we have created ourselves. I am brainstorming/working on this this week @blindij.

@bast bast self-assigned this Nov 6, 2017
@blindij
Copy link
Contributor

blindij commented Nov 6, 2017

My motivation for TBB was to show that you could test a library/package in three steps:

  1. Download and unpack
  2. Go looking for the Config.cmake
  3. Use it by hinting to find_package()about the path the Config.cmake

This is not completely true, since you must refer to the package name either by name (TBB::tbb) or
variable ${TBB_IMPORTS}, and you must at least look at README to find the name of the variable.

@bast
Copy link
Member Author

bast commented Nov 6, 2017

OK I will have a careful look. Of course I don't want to remove a good example. So what is it that we try to achieve precisely in this exercise? I hope this is not a silly question: I would really like that we are clear about the goal of this and then we can assess whether this is a good example.

@bast
Copy link
Member Author

bast commented Nov 6, 2017

Because my feeling was that we want to demonstrate how find_package works. But let us sharpen the goal first.

@blindij
Copy link
Contributor

blindij commented Nov 6, 2017

You want to try out a package/library from somebody else. find_package() ease the process, but you need to know where to look( use of the hint) and you need to know the name of the library in CMake context. In the TBB case, it is TBB::tbb or ${TBB_IMPORTS}

@bast
Copy link
Member Author

bast commented Nov 6, 2017

OK so the goal of this exercise is to demonstrate find_package to locate an external package and we want to demonstrate that it might be necessary to provide hints to the find functions? Because if yes, then I think we can demonstrate this with some super simple example and can possibly avoid explaining what TBB is and going into TBB internals (like TBB_IMPORTS).

@blindij
Copy link
Contributor

blindij commented Nov 6, 2017

Yes.

@bast
Copy link
Member Author

bast commented Nov 6, 2017

OK let's see what I come up with - I use this week as CMake week and will go through entire lesson and try to simplify and motivate more.

@blindij
Copy link
Contributor

blindij commented Nov 6, 2017

What about starting with CMake, and then do the Makefile, since we use Make to build anyway? Hence make becomes a kind of detour, before we go deeper into make.

@bast
Copy link
Member Author

bast commented Nov 6, 2017

The motivation for starting with Make was to cater to Python/R folks and to understand why Makefiles exist and then arrive at limitations of Make and motivate CMake. Then some Python/R participants may switch off. If we do it the other way, my worry is that we might not reconnect to the interpreted language folks at all.

@bast
Copy link
Member Author

bast commented Nov 6, 2017

My goal was to show: Make is for everybody, CMake is for all those who compile.

@bast
Copy link
Member Author

bast commented Mar 21, 2018

I think this is solved/outdated now since the lesson evolved a lot since.

@bast bast closed this as completed Mar 21, 2018
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

No branches or pull requests

2 participants