seanfisk/cmake-flymake — pull request #1 by yifu (2013-04-16 12:48:56+00:00)
Title: Fix an issue occuring with commented cmake rules. 

Scenario:

Let's say you have a commented cmake rule, which is the case for my professional project. Then the regex matching will validate it and will try next to canonicalize the "flags.make" file. This file does not exist as well as its dir since the rules is commented in the CMake file both are not generated - so far I must explain that I have manually replaced the "add_exuctable" rule with the macro rule we use in my workplace and that custom macro rule creates the directory hosting the makefiles. I don't the behavior for add_executable (?).

As a consequence `readlink' will print an empty file, at least it was doing so in my tests. (It even interrupts my script actually, from continuing . I am not a shell guru and I didn't investigate further)

Maybe a better fix would be to replace --canonicalize with --canonicalize-missing which would make it more fault tolerant... But I guess it is a better behavior to avoid commented rules. Their must be a good reason not to process them.