Closed MeanSquaredError closed 1 year ago
Hi, thanks for the detailed description and research of the problem.
As you noted, paths from the detail/
folder are included directly without relying on include paths. However, for some reason, the CMakeLists in figcone_tree
does the opposite:
SealLake_HeaderOnlyLibrary(
NAMESPACE figcone
COMPILE_FEATURES cxx_std_17
INCLUDES
figcone_tree/detail/external
)
(which is the same as adding target_include_directories(figcone_tree INTERFACE figcone_tree/detail/external)
)
So the fix is trivial - the INCLUDES parameter should be removed from there.
I've already fixed it and incremented all dependent library versions, including figcone
. Please update to v2.4.10.
Thank you!
Thank you for developing figcone, it works quite well.
It seems that when I use cmake's find_package() + target_link_libraries(), it adds one superfluous include library.
Sample cmake code:
I have installed figcone in
/usr/local
Then when cmake starts building, the g++ command line it looks like this:Essentially it means that the target
figcone::figcone_formats
has/usr/local/include/figcone_tree/detail/external
listed in itsINTERFACE_INCLUDE_DIRECTORIES
(my program treats that directory as a system include directory becausefigcone::figcone_formats
is a system target)It seems that the target
figcone::figcone_formats
gets the superfluous directory from the targetfigcone::figcone_tree
.In turn
figcone::figcone_tree
puts/usr/local/include/figcone_tree/detail/external
intoINTERFACE_INCLUDE_DIRECTORIES
After looking in/usr/local/lib64/cmake/figcone_tree/figcone_treeTargets.cmake
it seems that the culprit is on line 63:${_IMPORT_PREFIX}/include/figcone_tree/detail/external
is added toINTERFACE_INCLUDE_DIRECTORIES
I think that this directory is not needed for the building of any projects using figcone, as all figcone include files that reference includes in detail/external specify relative path to their current directory, e.g. :
/usr/local/include/figcone_tree/stringconverter.h
does#include "detail/external/sfun/type_traits.h"
So they don't need
/usr/local/include/figcone_tree/detail/external
in their include path.I am not sure how exactly to modify the figcone project to remove that directory, so I am not providing a patch