Hi,
I have many libraries and packages that are being linked using
target_link_libraries(...) where CMake takes care of the include
directories. There are cases where I get compile errors because I don't
know the exact include directories.
I thought perhaps I could get the include directories of my target by doing
the following:
get_target_property(INCLUDE_DIRS MyExeThatLinksToManyLibs
INCLUDE_DIRECTORIES)
message(STATUS ${INCLUDE_DIRS}) # hoped that this would print all the
include directories
Unfortunately, that did not work as expected. It was missing directories
that I know are added to the include directories of the target (because the
compiler is able to find the headers properly).
Apart from sifting through the compile commands, is there a nice way to
debug the include directories of a target?
Thank you,
Saad
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake