Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Replace qt4_automoc with qt4_wrap_cpp #2

Closed
wants to merge 170 commits into from
Closed

Replace qt4_automoc with qt4_wrap_cpp #2

wants to merge 170 commits into from

Conversation

ilpianista
Copy link
Contributor

Hi Avogadro team,
I'm the avogadro maintainer in Arch Linux.

We are updating boost to 1.48.0, but Qt moc has a bug with this boost version (you can find more info here[1]).
Avogadro uses moc, so avogadro has this bug too. In fact when you build avogadro 1.0.3 with boost 1.48.0 you get:

[ 4%] Generating pythonextension_p.moc
usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
make[2]: *** [libavogadro/src/pythonextension_p.moc] Error 1
make[1]: *** [libavogadro/src/CMakeFiles/avogadro.dir/all] Error 2

In the qt bug report an user said that passing a specific option to moc the bug can be avoided.
But the only one method to pass some option to moc in cmake is the QT4_WRAP_CPP macro.
You use this macro in the libavogadro/CMakeLists.txt, but you don't in libavogadro/src/CMakeLists.txt and libavogadro/src/python/CMakeLists.txt; you use qt4_automoc there.
So I replaced qt4_automoc usage with the qt4_wrap_cpp macro in those CMakeLists.txt.

You would merge my commit.
Note, I had to move the ReadFileThread class declaration in another header (moleculefile_p.h) to make the macro work.

Cheers.

[1] https://bugreports.qt.nokia.com/browse/QTBUG-22829

Geoff Hutchison and others added 30 commits February 18, 2010 20:37
This was referenced Apr 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants