diff --git a/tests/auto/debugger/offsets.pro b/tests/auto/debugger/offsets.pro index 8e650e7c5b6..bee697ecffc 100644 --- a/tests/auto/debugger/offsets.pro +++ b/tests/auto/debugger/offsets.pro @@ -4,4 +4,13 @@ include(../../../src/private_headers.pri) QT += core-private +exists(/usr/include/boost/unordered/unordered_set.hpp) { + DEFINES += HAS_BOOST +} + +exists(/usr/local/include/boost/unordered/unordered_set.hpp) { + DEFINES += HAS_BOOST + INCLUDEPATH += /usr/local/include +} + SOURCES += tst_offsets.cpp diff --git a/tests/auto/debugger/tst_offsets.cpp b/tests/auto/debugger/tst_offsets.cpp index ffbe17b327f..e685a4f0495 100644 --- a/tests/auto/debugger/tst_offsets.cpp +++ b/tests/auto/debugger/tst_offsets.cpp @@ -38,7 +38,9 @@ #include #include +#ifdef HAS_BOOST #include +#endif class tst_offsets : public QObject { @@ -189,6 +191,7 @@ void tst_offsets::offsets_data() #endif } +#ifdef HAS_BOOST { boost::unordered::unordered_set *p = 0; @@ -199,6 +202,7 @@ void tst_offsets::offsets_data() QTest::newRow("boost::unordered::unordered_set::buckets_") << int((char *)&p->table_.buckets_ - (char *)p) << 20 << 40; } +#endif }