[CMake] Ninja generator fail for QNX on Windows
Cristian Adam
cristian.adam at gmail.com
Tue Sep 23 09:05:58 EDT 2014
On Mon, Sep 22, 2014 at 6:32 PM, Bill Hoffman <bill.hoffman at kitware.com>
wrote:
> Maybe if you looked at the very first older than in your output instead of
> the dirty ones it might tell you what ninja thinks is out of date. Could be
> some sort of path issue that has something to do with the way the paths are
> constructed. Again, without seeing the details I can only guess.
>
> Do makefiles work for you? What if you try the "Unix Makefiles" generator
> on the same machine does it have the same problem?
>
> -Bill
>
Unix Makefiles work, but on the make provided by QNX doesn't support the
parallel -j flag.
Found the problem though.
QCC compiler generates for this project dependency files which look like:
c:\projects\my_proj\include\/a.h \
c:\projects\my_proj\src\/a.cpp \
c:\projects\my_proj\other\..\/include/b.h \
c:\projects\my_proj\other\..\/src/b.cpp \
The "\/" combination does not agree with ninja.
I've tried to hack disk_interface.cc:RealDiskInterface::Stat by removing
the "/" prefix.
string dir = DirName(path);
> string base(path.substr(dir.size() ? dir.size() + 1 : 0));
>
> if (base[0] == '/' || base[0] == '\\')
> {
> base.erase(0, 1);
> }
>
>
But this fixes only the a.h and a.cpp case.
The other case with doesn't work though, since the path is no longer
present, Stat received only "include/b.h" and "src/b.cpp".
A workaround would be to search and replace all "\/" occurrences in
all dependency files.
This looks like a ninja bug, I'll report it there.
Thank you for the support.
Cheers,
Cristian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140923/2dfa392b/attachment.html>
More information about the CMake
mailing list