<span class="Apple-style-span" style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Put the "include(CTest)" line in your top level CMakeLists.txt file.<div><br></div><div>
Do a full clean re-configure (remove the "build" directory, make a new empty "build" directory and run CMake again).</div><div><br></div><div>If it still happens after that, we need more details about your project.</div>
<div><br></div><div>You should be able to build "Experimental" (or just run ctest) after a configure of a project that includes CTest, and uses add_test to add tests to the project.</div><div><br></div><div><br>
</div><div>HTH,</div><div>David</div></span><div><br></div><br><div class="gmail_quote">On Wed, Jun 20, 2012 at 2:43 PM, Robert Ramey <span dir="ltr"><<a href="mailto:ramey@rrsd.com" target="_blank">ramey@rrsd.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I received the adive:<br>
<div class="im"><br>
include(CTest)<br>
instead of:<br>
enable_testing()<br>
Including CTest.cmake will automatically enable_testing(), but it also<br>
configures the "test configuration file" it's complaining about...<br>
<br>
</div><div class="im">and was rewarded with a working VS 9 project. The test_subtract project<br>
built - as it did before. I then "built" the "Experimental" project which<br>
generated the following output on my VS output window.<br>
<br>
1>------ Build started: Project: Experimental, Configuration: Debug<br>
</div>1>Win32 ------ Cannot find file: C:/Projects/Boost<br>
1>Projects/safe_numerics/build/tests/DartConfiguration.tcl<br>
<div class="im">1> Site:<br>
1> Build name:<br>
</div>1>Create new tag: 20120619-2150 - Experimental Configure project Cannot<br>
1>find ConfigureCommand key in the DartConfiguration.tcl Cannot find<br>
1>file: C:/Projects/Boost<br>
1>Projects/safe_numerics/build/tests/DartConfiguration.tcl<br>
1>Build project<br>
1>Cannot find MakeCommand key in the DartConfiguration.tcl Cannot find<br>
1>file: C:/Projects/Boost<br>
1>Projects/safe_numerics/build/tests/DartConfiguration.tcl<br>
<div class="im">1>Test project C:/Projects/Boost Projects/safe_numerics/build/tests<br>
1> Start 1: test_subtract<br>
1>1/1 Test #1: test_subtract ....................***Exception: SegFault<br>
</div>1>0.42 sec 0% tests passed, 1 tests failed out of 1 Total Test time<br>
1>(real) = 0.52 sec The following tests FAILED:<br>
<div class="im">1> 1 - test_subtract (SEGFAULT)<br>
1>Cannot find file: C:/Projects/Boost<br>
</div>1>Projects/safe_numerics/build/tests/DartConfiguration.tcl<br>
<div class="im">1>Performing coverage<br>
1>^CTerminate batch job (Y/N)?<br>
1>Build log was saved at "file://c:\Projects\Boost<br>
Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm"<br>
1>Experimental - 0 error(s), 0 warning(s)<br>
1><br>
1><br>
1>The build has been canceled at the user's request<br>
that last command "Performing Coverage" seemed to hang this system so I<br>
canceled the build after a few minutes.<br>
The message:<br>
1>Cannot find file: C:/Projects/Boost<br>
</div>1>Projects/safe_numerics/build/tests/DartConfiguration.tcl<br>
<div class="im"><br>
Note that I found a new file in my project:<br>
C:/Projects/Boost Projects/safe_numerics/build/DartConfiguration.tcl<br>
That is, directly in my build directory rather than in "tests" subdirectory.<br>
OK I moved this down to the "tests" directory and tried again. This looks<br>
more promising.<br>
</div>Now when I try to build "Experimental" Project I get:<br>
<div class="im"><br>
1>------ Build started: Project: Experimental, Configuration: Debug<br>
Win32 ------<br>
1> Site: RRSD01<br>
1> Build name: Win32-vs9<br>
</div>1>Create new tag: 20120619-2225 - Experimental Configure project<br>
<div class="im">1> Each . represents 1024 bytes of output<br>
1> . Size of output: 0K<br>
1>Build project<br>
1> Each symbol represents 1024 bytes of output.<br>
1> '!' represents an error and '*' a warning.<br>
1> . Size of output: 0K<br>
1> 0 Compiler errors<br>
1> 0 Compiler warnings<br>
</div>1>Test project C:/Projects/Boost Projects/safe_numerics/build No tests<br>
1>were found!!!<br>
<div class="im">1>Performing coverage<br>
1> Cannot find any coverage files. Ignoring Coverage request.<br>
1>Submit files (using http)<br>
1> Using HTTP submit method<br>
1> Drop site:http://<br>
1> Submit failed, waiting 5 seconds...<br>
1> Retry submission: Attempt 1 of 3<br>
1> Submit failed, waiting 5 seconds...<br>
1> Retry submission: Attempt 2 of 3<br>
1> Submit failed, waiting 5 seconds...<br>
1> Retry submission: Attempt 3 of 3<br>
1> Error when uploading file: C:/Projects/Boost<br>
Projects/safe_numerics/build/Testing/20120619-2225/Build.xml<br>
1> Error message was: Empty reply from server<br>
1> Problems when submitting via HTTP<br>
1>Errors while running CTest<br>
</div>1>Project : error PRJ0019: A tool returned an error code from Build log<br>
1>was saved at "file://c:\Projects\Boost<br>
<div class="im HOEnZb">Projects\safe_numerics\build\tests\Experimental.dir\Debug\BuildLog.htm"<br>
1>Experimental - 1 error(s), 0 warning(s)<br>
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========<br>
?<br>
still it's not what I expect to see.<br>
Is there some really obvious thing I've over looking here?<br>
<br>
</div><div class="HOEnZb"><div class="h5">Robert Ramey<br>
<br>
<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>