I am trying to build a sub C project that refers to multiple headers recursively from another project, which also contains unused headers. Instead of including all the unwanted header files in target_include_directories
. I want to include only the required headers.
Note: The C project's CMake Build is not 100% through. I am facing errors in few headers.
I want those intermediate build files i.e. list of header files consumed by the C sources.
Is there is anyway to obtain the list?
Related Question with GCC list of all header files included by a C file