mattreecebentley / plf_colony

An unordered C++ data container providing fast iteration/insertion/erasure while maintaining pointer/iterator validity to non-erased elements regardless of insertions/erasures. Provides higher-performance than std:: library containers for high-modification scenarios with unordered data.
https://plflib.org/colony.htm
zlib License
398 stars 33 forks source link

Add cmake file and "standard" project layout #21

Closed Mike-Devel closed 5 years ago

Mike-Devel commented 5 years ago

I know, this probably seems overkill for a single header library, but have you considered adding a simple cmake file that provides a Plf::cplony target and maybe to adopt a project layout that puts the header files in a subfolder with the name of your library (as much as such a thing exists?) Specifically I'd put the code into <project-root>/include/plf/colony.h or <project-root>/plf/colony.h.

The idea behind it isn't that it would make using plf_colony much simpler than it already is (but also not harder) it is just that this way, one can use all dependencies in a similar fashion, regadless, of how big or small they are or how complicated their project structure is:

I could e.g. just use

target_link_libraries( my_target PULBIC 
        Boost::filesystem
        Plf::colony
        Catch2::Catch2     
       ... other dependencies      
) 

to my cmake script and

 #include <boost/filesystem/fstream.hpp>
 #include <plf/colony.h>
 #include <catch2/catch.hpp>
 #include <lib/file.h>

to my c++ code.

mattreecebentley commented 5 years ago

Yeah, definitely not. People have all sorts of layouts and configs for their projects.

Mike-Devel commented 5 years ago

What about the cmake file?

mattreecebentley commented 5 years ago

ps. if you want to make a cmake setup and have it linked to in readme.md in the same way that the conan package currently does, happy to do that, provided setup doesn't include colony code.

Mike-Devel commented 5 years ago

Thanks, but if the cmake file is not part of the repository containing the code, I don't see the point. We'll just use our own fork with our standard project layout and cmake file.

mattreecebentley commented 5 years ago

shrug Up to you.

On Sat, 13 Apr 2019 at 00:09, Mike-Devel notifications@github.com wrote:

Thanks, but if the cmake file is not part of the repository containing the code, I don't see the point. We'll just use our own fork with our standard project layout and cmake file.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mattreecebentley/plf_colony/issues/21#issuecomment-482550562, or mute the thread https://github.com/notifications/unsubscribe-auth/AEnCooYdPdg-btIs7WgwsKp236j5dUJHks5vgHdggaJpZM4btHPb .