<div>Hi all,</div>
<div>&nbsp;</div>
<div>I have a directory structure with follwoign cmakelist as:</div>
<div>&nbsp;</div>
<div>myfold</div>
<div>....Cmakelist.txt</div>
<div>....subfolder</div>
<div>&nbsp;</div>
<div>subfolder</div>
<div>....Cmakelists.txt</div>
<div>....myfile.cpp</div>
<div>&nbsp;</div>
<div>Contents of Cmakelist of subfolder:</div>
<div>&nbsp;</div>
<div>add_executable(myfile myfile.cpp)</div>
<div>target_link_libraries(myfile mylib)</div>
<div>add_test(t1 myfile)</div>
<div>&nbsp;</div>
<div>t1 is the test case defined in myfile.cpp whose executable i have made.</div>
<div>&nbsp;</div>
<div>Contents of Camkelist of myfolder:</div>
<div>&nbsp;</div>
<div>Project(myfolder)</div>
<div>ENABLE_TESTING()</div>
<div>add_subdirectory(subfolder)</div>
<div>&nbsp;</div>
<div>Now when i am running make test from the myfolder directory on the prompt it says test failed and saying error with ctest.</div>
<div>&nbsp;</div>
<div>Iam not able to know whether my way of testing is&nbsp;right or not. i am sure that it is wrong but dont know where.</div>
<div>&nbsp;</div>
<div>Can anybody tell me where iam wrong. I reasd the documentation realted to add_test and ctest but not getting proper example to clear my doubts.</div>
<div>&nbsp;</div>
<div>Apart from that i more thing i want to know is that the name of the test &nbsp;we are giving in add_test() command as its first argument is the name of the test that is defined in the&nbsp;executable which we have made.&nbsp;</div>

<div>&nbsp;</div>
<div>Since iam using&nbsp;it first time iam not clear about all these and documentationdoes nto clearify my doubts.</div>
<div>&nbsp;</div>
<div>I request if anybody give me an example&nbsp;or whatever ia haev given to tell me the&nbsp;right way of testing through cmake.</div>
<div>&nbsp;</div>
<div>Any suggestion &nbsp;in this will be really a great help for me.</div>
<div>&nbsp;</div>
<div>Any further information if required that i am missing plz let me know.</div>
<div>&nbsp;</div>
<div>Regards-</div>
<div>Ankit</div>