[cmake-developers] linked-usage-cleanup regressed automoc
Stephen Kelly
steveire at gmail.com
Mon Mar 11 18:54:01 EDT 2013
Alexander Neundorf wrote:
> Unfortunately this patch creates bug (
> http://public.kitware.com/Bug/view.php?id=13999 ) and doesn't fix the
> actual problem, the crash is still there.
>
> Before this patch, void cmQtAutomoc::SetupAutomocTarget(cmTarget* target)
> returned early if no Qt was present, and nothing bad happened in this
> case.
I think the better solution is to return early from InitializeMocSourceFile
in that case. I implemented that as the fix-automoc-no-qt branch.
>
> With this patch, the <target>_automoc.cpp file is added to every target.
> Probably this fixes the original problem because now the target
> "no_link_language" has a link language, due to its newly attached source
> file no_link_language_automoc.cpp.
> It then crashes:
>
> CMake Error: CMake can not determine linker language for
> target:no_link_language
Yes, the problem is that CMake errors at generate-time do not actually
abort. All bets are off after hitting an error like that. Some if() {
return; } code could be added, but I don't think that would improve the
situation. It could just be delaying the occurance of another segfault.
Can something be done about generate-time errors instead?
Thanks,
Steve.
More information about the cmake-developers
mailing list