vector-of-bool / pitchfork

Pitchfork is a Set of C++ Project Conventions
MIT License
1.1k stars 56 forks source link

[Feature Request] Add an installable add_pf_library cmake function #27

Open MikeGitb opened 5 years ago

MikeGitb commented 5 years ago

As the title says, it would be nice, if you could provide a add_pf_library(<name> <root-dir>) (and add_pf_executable) cmake function that just takes the root directory of a project as an argument, creates a cmake target with the appropriate name and adds the include directory and source files according to the layout specified in this proposal.

I wouldn't provide a lot of configuration options, because if the user has special requirements, he/she can just as easily create a matching cmake target manually.

Quincunx271 commented 5 years ago

Does pf_auto do what you want? Defined in https://github.com/vector-of-bool/pitchfork/blob/develop/extras/pf-cmake/auto.cmake, used in the root CMakeLists: https://github.com/vector-of-bool/pitchfork/blob/develop/CMakeLists.txt

MikeGitb commented 5 years ago

Well, it seems to do much more than what I had in mind but that seems fine (after cursory inspection). Would be nice to have a root-dir parameter though