Running on OSX with Qt v5.6.1 (downloaded directly from qt.io) seems to compile fine.
$ cmake ..
-- The C compiler identification is AppleClang 7.3.0.7030031
-- The CXX compiler identification is AppleClang 7.3.0.7030031
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
-- Generating done
-- Build files have been written to: ~/tmp/DOtherSide/build
$ ./test/TestDynamicQObject
********* Start testing of TestQGuiApplication *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQGuiApplication::initTestCase()
PASS : TestQGuiApplication::testExecution()
PASS : TestQGuiApplication::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQGuiApplication *********
********* Start testing of TestQApplication *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQApplication::initTestCase()
PASS : TestQApplication::testExecution()
PASS : TestQApplication::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQApplication *********
********* Start testing of TestQVariant *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQVariant::initTestCase()
PASS : TestQVariant::testCreate()
PASS : TestQVariant::testInt()
PASS : TestQVariant::testBool()
PASS : TestQVariant::testFloat()
PASS : TestQVariant::testDouble()
PASS : TestQVariant::testString()
PASS : TestQVariant::testQObject()
PASS : TestQVariant::testArray()
PASS : TestQVariant::cleanupTestCase()
Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQVariant *********
********* Start testing of TestQUrl *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQUrl::initTestCase()
PASS : TestQUrl::testCreate()
PASS : TestQUrl::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQUrl *********
********* Start testing of TestQModelIndex *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQModelIndex::initTestCase()
PASS : TestQModelIndex::testCreate()
PASS : TestQModelIndex::testRow()
PASS : TestQModelIndex::testColumn()
PASS : TestQModelIndex::testParent()
PASS : TestQModelIndex::testChild()
PASS : TestQModelIndex::testSibling()
PASS : TestQModelIndex::testData()
PASS : TestQModelIndex::cleanupTestCase()
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQModelIndex *********
********* Start testing of TestQQmlApplicationEngine *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQQmlApplicationEngine::initTestCase()
PASS : TestQQmlApplicationEngine::testCreateAndDelete()
PASS : TestQQmlApplicationEngine::testLoadUrl()
PASS : TestQQmlApplicationEngine::testLoadData()
PASS : TestQQmlApplicationEngine::cleanupTestCase()
Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQQmlApplicationEngine *********
********* Start testing of TestQQmlContext *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQQmlContext::initTestCase()
PASS : TestQQmlContext::testCreateAndDelete()
PASS : TestQQmlContext::testSetContextProperty()
PASS : TestQQmlContext::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQQmlContext *********
********* Start testing of TestQObject *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQObject::initTestCase()
PASS : TestQObject::testObjectName()
PASS : TestQObject::testPropertyReadAndWrite()
PASS : TestQObject::testSignalEmittion()
PASS : TestQObject::testArrayProperty()
PASS : TestQObject::cleanupTestCase()
Totals: 6 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQObject *********
********* Start testing of TestQAbstractListModel *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQAbstractListModel::initTestCase()
PASS : TestQAbstractListModel::testObjectName()
PASS : TestQAbstractListModel::testPropertyReadAndWrite()
PASS : TestQAbstractListModel::testSignalEmittion()
PASS : TestQAbstractListModel::testRowCount()
PASS : TestQAbstractListModel::testColumnCount()
PASS : TestQAbstractListModel::testData()
PASS : TestQAbstractListModel::testSetData()
PASS : TestQAbstractListModel::cleanupTestCase()
Totals: 9 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQAbstractListModel *********
********* Start testing of TestQDeclarativeIntegration *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQDeclarativeIntegration::initTestCase()
PASS : TestQDeclarativeIntegration::testQmlRegisterType()
PASS : TestQDeclarativeIntegration::testQmlRegisterSingletonType()
PASS : TestQDeclarativeIntegration::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQDeclarativeIntegration *********
********* Start testing of TestQQuickView *********
Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 7.0.2 (clang-700.1.81) (Apple))
PASS : TestQQuickView::initTestCase()
PASS : TestQQuickView::testCreate()
PASS : TestQQuickView::testSourceAndSetSource()
PASS : TestQQuickView::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped, 0 blacklisted
********* Finished testing of TestQQuickView *********