Search code examples
c++cmakeqemuwinectest

CMake/CTest integration with wine/qemu


What I have:

I develop native unity plugin for different platforms including

  • iOS
  • Android
  • Windows
  • OSX

I use cmake as build-system and ctest for unit-tests

My build environment - osx, so it's not a problem to run unit tests on osx.

Also I know that for testing Android and Windows I can use qemu and wine accordingly.

Questions:

  • I just wondering cmake/ctest provide any variables to specify some emulators like wine or qemu? Or should I write some custom scripts for this?

  • How can I run native unit tests on iOS (device or emulator)? Is it possible with qemu?


Solution

  • Check out CMAKE_CROSSCOMPILING_EMULATOR. Best set it in your toolchain file.