On 03/12/2015, Robert LeBlanc wrote: > I'm trying to do some testing of Ceph components specifically around > the OP queues. I'm trying to use the class in a simple program where I > will do my testing, but I can't resolve one problem. I've had to > include types.h as forward defining the Formatter class (already > included/forward defined in the base class). This is based on my PR > https://github.com/ceph/ceph/pull/6781 . Ceph's assert is infelicitous. The libcommon static library has the definitions in src/common/assert.cc. It depends on other things, though, so the easiest thing to do, if you're using autotools, is just to add a target to one of the Makefile.am scripts (probably in src/test) that uses CEPH_GLOBAL as its library. If you just copy and modify one of the targets for the binary tests, your program will get built as part of the unittests target. (You'll have to build src/gmock and src/gmock/gtest manually to call make unittests on its own.) If you're using cmake, it's simpler. Just copy one of the add_executable/target_link_libraries pairs in src/test/CMakeLists.txt and modify as appropriate. Your executable will be built as part of the default CMake target. -- Senior Software Engineer Red Hat Storage, Ann Arbor, MI, US IRC: Aemerson@{RedHat, OFTC, Freenode} 0x80F7544B90EDBFB9 E707 86BA 0C1B 62CC 152C 7C12 80F7 544B 90ED BFB9
Attachment:
signature.asc
Description: PGP signature