<div>Hello,</div><div><br></div><div>I&#39;m starting to use CTest and having some trouble generating the test driver.</div><div><br></div><div>Here is the cmake commands I&#39;m using :</div><div><br></div><div><div>create_test_sourcelist (Tests_src</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>TestSuite.cpp</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>../src/testTest.cpp</div><div>)</div><div><br></div><div>My directory structure is </div>
<div><br></div><div>LoggerTest/</div><div>    - build/</div><div>        -CMakeLists.txt</div><div>    - inc/</div><div>    - src/</div><div>         testTest.cpp   (which contains int testTest(int argc, char*[] argv) )</div>
</div><div><br></div><div>When I run &#39;cmake .&#39;  it generates a file called TestSuite.cpp which doesn&#39;t compile when I then run &quot;make&quot;</div><div><br></div><div>The reason is that cmake generated a function prototype like this :</div>
<div><div><br></div><div>/* Forward declare test functions. */</div><div>int .._src_testTest(int, char*[]);</div></div><div><br></div><div><br></div><div>(Obviously, I tested putting the CMakeLists.txt and the source files in one same directory, and it works, but I don&#39;t think that&#39;s an elegant solution)</div>
<div><br></div><div>Does anyone have a clean solution to fix this issue and keep the CMakeLists.txt in a separate folder than the source files ?</div><div><br></div><div>Thanks a lot,</div><br clear="all">Raphaël Mor<br>