]> sigrok.org Git - pulseview.git/commit
Build system: Fix issue with unit tests, simplify code.
authorUwe Hermann <redacted>
Sat, 29 Nov 2014 16:42:10 +0000 (17:42 +0100)
committerUwe Hermann <redacted>
Sat, 29 Nov 2014 16:48:08 +0000 (17:48 +0100)
commit226a15274c4b0f3374bed48c0c4684484762ccf5
tree03c6368587b17b2df4588789c2d190ab818b51fc
parentc17403e8725f31216eb665f4da7018c580346eaa
Build system: Fix issue with unit tests, simplify code.

Drop some unneeded lines from test/CMakeLists.txt. Most of the variables
are inherited from the main CMakeLists.txt file. This reduces the amount
of duplicated code and the likelyhood that the two CMakeLists.txt files
get out of sync.

This fixes the following issues when building the unit tests
(related to mixing Qt4 and Qt5 apparently):

  [ 69%] Building CXX object CMakeFiles/pulseview.dir/signalhandler.cpp.o
  [...]/test/__/pv/moc_sigsession.cxx:13:2:
  error: #error "This file was generated using the moc from 4.8.6. It"
   #error "This file was generated using the moc from 4.8.6. It"
    ^
  [...]/test/__/pv/moc_sigsession.cxx:14:2:
  error: #error "cannot be used with the include files from this version of Qt."
   #error "cannot be used with the include files from this version of Qt."
    ^
  [...]/test/__/pv/moc_sigsession.cxx:15:2:
  error: #error "(The moc has changed too much.)"
   #error "(The moc has changed too much.)"
    ^
  [...]/test/__/pv/moc_sigsession.cxx:64:7:
  error: ‘QMetaObjectExtraData’ does not name a type
   const QMetaObjectExtraData pv::SigSession::staticMetaObjectExtraData = {
         ^
  [...]/test/__/pv/moc_sigsession.cxx:70:37:
  error: ‘staticMetaObjectExtraData’ was not declared in this scope
         qt_meta_data_pv__SigSession, &staticMetaObjectExtraData }
                                       ^
  [...]/test/__/pv/moc_sigsession.cxx:
  In member function ‘virtual const QMetaObject* pv::SigSession::metaObject() const’:
  [...]/test/__/pv/moc_sigsession.cxx:79:71:
  error: conditional expression between distinct pointer types
  ‘QDynamicMetaObjectData*’ and ‘const QMetaObject*’ lacks a cast
       return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
                                                                         ^
  [...]/test/__/pv/moc_sigsession.cxx:80:1:
  warning: control reaches end of non-void function [-Wreturn-type]
   }
   ^
  test/CMakeFiles/pulseview-test.dir/build.make:1362: recipe for target
  'test/CMakeFiles/pulseview-test.dir/__/pv/moc_sigsession.cxx.o' failed
  make[2]: ***
  [test/CMakeFiles/pulseview-test.dir/__/pv/moc_sigsession.cxx.o] Error 1
  CMakeFiles/Makefile2:110: recipe for target
  'test/CMakeFiles/pulseview-test.dir/all' failed
  make[1]: *** [test/CMakeFiles/pulseview-test.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
CMakeLists.txt
test/CMakeLists.txt