[CMake] retrieving and manipulating (Fortran) dependency information

Stephen Kelly steveire at gmail.com
Mon Feb 3 12:28:15 EST 2014


Zaak Beekman wrote:

> (I am trying to setup flymake targets for emacs which don't (re)compile
> anything, but rather run the compilers with the compile time warning flags
> and -syntax-only flags. Modules and dependency resolution in Fortran is
> the main impediment here and if I can come up with a sane solution I may
> implement it as a CMake module and share it with others.)

You might consider getting the compile commands another way. CMake can 
export the compile commands used by setting CMAKE_EXPORT_COMPILE_COMMANDS.

 http://clang.llvm.org/docs/JSONCompilationDatabase.html

It works with the Makefile and Ninja generators. I don't know if it works 
for Fortran, but you could contribute that extension to cmake if it's 
suitable. You could then process the json file and add -syntax-only where 
appropriate.

Thanks,

Steve.




More information about the CMake mailing list