New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt moc fails if sources have same name #3797
Comments
The reason this happens is that the generator output name is I can't think of what the true and correct solution for this would be. In general it is considered poor form to have many files in your project with the exact same name. It is very confusing because sooner or later you will mix the two up. Obviously renaming files is not a simple solution for you. A workaround is to compile files with identical names (in this case e.g. |
Thanks for the suggested workaround, will give it a try. I agree it can be confusing having files with the same name in different named subfolders, but I do not think meson should force such a restriction upon the user, still. So I think a proper fix for this is needed and especially for the similar problem with resources, where it is probably even more common to have files with same name in subfolders. |
@jpakkane Yeah but if you add regular sources with same name Meson will handle it correctly. E.g.
will compile bar.o and foo_bar.o. So moc should generate moc_bar.cpp and mod_foo_bar.cpp. |
That's because those use a generator and that uses |
Yeah, it will break moc_source and ui_files arguments. Maybe instead of appending directory prefixes to file names Meson should create an actual directory structure (setting correct includes to current directory), like CMake and Waf do. This will solve the issue with same file names for generators too. |
Does this promblem solve? |
Similar to #3791, the Qt modules fails with moc files that have the same name:
The text was updated successfully, but these errors were encountered: