title: Boost test linking
body: <p>I want to use <code>Boost test</code> in my project.</p>
  
  <p>I use cmake in my project so I wrote a simple <code>CMakeList.txt</code> for wrapping it:</p>
  
  <pre class="lang-none prettyprint-override"><code>find_package (Boost COMPONENTS unit_test_framework REQUIRED)
  file(GLOB_RECURSE UnitTests_sources tests/*.cpp)
  add_executable(UnitTests
      ${UnitTests_sources}
  )
  enable_testing()
  ADD_TEST (UnitTests UnitTests)
  </code></pre>
  
  <p>So, cmake works fine here. The trouble becomes during compiling:</p>
  
  <blockquote>
    <p>Linking CXX executable ../../bin/UnitTests</p>
    
    <p>/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../lib/crt1.o: In
    function <code>_start': (.text+0x20): undefined reference to</code>main'
    collect2: ld returned 1 exit status</p>
  </blockquote>
  
  <p>Here is the only file in <strong>tests</strong> folder (<code>LogManagerTest.cpp</code>):</p>
  
  <pre><code>#include "Utils/LogManager.hpp"
  #include &lt;boost/test/unit_test.hpp&gt;
  
  #define BOOST_TEST_DYN_LINK
  #define BOOST_TEST_MAIN
  
  #define BOOST_TEST_MODULE LogManager
  
  BOOST_AUTO_TEST_CASE(LogManagerCase)
  {
      BOOST_REQUIRE(true);
      /*LogManager manager;
      manager.Initialize();
      manager.Deinitialize();*/
  }
  </code></pre>
  
  <p>What's wrong here?</p>