Skip to content
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

Modular fix cmake #1040

Closed
wants to merge 3 commits into from
Closed

Modular fix cmake #1040

wants to merge 3 commits into from

Conversation

guitorri
Copy link
Member

Qucs build and runs. Tested both cmake and autotools.
I am afraid the issues I had were due to cmake and its automoc feature.
Somehow it includes all the code to be moc'ed. This created collision of definitions (F, p1,...).
I guess all the code end up on the same translation unit.
Taking a step back the .cc headers should have worked. The .hqt don't work with cmake. I picked .hxx for a change...
Up to you if you want to revert.

Automoc lists all files that need to be moc'ed.
This creates a condition where redeclaration may occur.
It seems that all moc'ed files end up on the same translation unit?

Anyway, using QT5_WRAP_CPP() to manually run moc on each header seems to do the trick.

https://cmake.org/cmake/help/v3.20/prop_tgt/AUTOMOC.html
@felix-salfelder
Copy link
Member

felix-salfelder commented Mar 16, 2021 via email

@felix-salfelder
Copy link
Member

cmake does not seem to mind .hqt. i picked the two other commits. This leaves minor issues only. \o/

@guitorri guitorri closed this Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants