0

How do you get all dependent header files from a source file in CMake?

My question is based on this : Listing header files in Visual Studio C++ project generated by cmake

In that question, the answer is to list all the header files to the target. One of the comment says that it is possible to get all the C++ dependent header files from the source file because CMake does know about it.

Community
  • 1
  • 1
bysreg
  • 793
  • 1
  • 9
  • 30
  • well, gcc has `-M` (or `-MM` to skip "system" headers) mode which generates Makefile-style dependencies for a given source file. – user3159253 Nov 16 '15 at 04:14
  • It seems that MSVC supports `/showIncludes' switch: https://msdn.microsoft.com/en-us/library/hdkef6tk.aspx?f=255&MSPPError=-2147217396 – user3159253 Nov 16 '15 at 04:16

0 Answers0