title: How to use check library with CTest for unit testing in C
body: <p>I have project in which I want to use <a href="http://check.sourceforge.net/" rel="nofollow">check</a> library for unit testing.</p>
  
  <p>My current project is using CMake and has following structure:</p>
  
  <pre>
  .
  ├── CMakeLists.txt
  ├── COPYING
  ├── ChangeLog
  ├── README
  ├── src
  │   ├── core
  │   │   ├── CMakeLists.txt
  │   │   └── main.c
  │   ├── core-test
  │   │   ├── CMakeLists.txt
  │   │   └── main.c
  │   └── scrypt
  └── doc
      └── protocol.txt
  </pre>
  
  <p>In <code>core-test</code> I have unit tests for <code>core</code> module. In <code>scrypt-test</code> I will have tests for <code>scrypt</code> module and so on.</p>
  
  <hr>
  
  <p>Does using <code>check</code> with CTest make sense?</p>
  
  <p>If yes: how do I connect unit test that use <code>check</code> to CMake/CTest project? Do I need additional configuration for CTest to interpret results from <code>check</code>-enabled executables?</p>