efficient / libcuckoo

A high-performance, concurrent hash table
Other
1.61k stars 275 forks source link

cmake: set include directory to the current dir; CMAKE_SOURCE_DIR could differ from it. #115

Closed yatli closed 3 years ago

manugoyal commented 4 years ago

Hi @yatli, I believe the setting to CMAKE_SOURCE_DIR is intentional. I'm trying to enforce that when including the library, you must include it as

#include <libcuckoo/cuckoohash_map.hh>

rather than

#include <cuckoohash_map.hh>

Does that seem like the right way to enforce this?

yatli commented 4 years ago

I was using libcuckoo as a git submodule in my cmake project, so CMAKE_SOURCE_DIR actually points to my project root.

How about $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/..?

milianw commented 3 years ago

Please see https://github.com/efficient/libcuckoo/pull/139/commits/b9cbd3e2d115cebce94f4c1358b1c2219fb43633 for an alternative approach

milianw commented 3 years ago

This can be abandoned, now that my alternative approach was merged.