Do:<div><br></div><div>include(CTest)</div><div><br></div><div>instead of:</div><div><br></div><div>enable_testing()</div><div><br></div><div>Including CTest.cmake will automatically enable_testing(), but it also configures the &quot;test configuration file&quot; it&#39;s complaining about...</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><div class="gmail_quote">On Tue, Jun 19, 2012 at 5:19 PM, Robert Ramey <span dir="ltr">&lt;<a href="mailto:ramey@rrsd.com" target="_blank">ramey@rrsd.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m working through my first CMake/CTest project.<br>
<br>
My directory structure looks like<br>
<br>
safe_numerics/<br>
    CMakeLists.txt // #1<br>
    build/ // out of source build directory<br>
    include/<br>
    examples/<br>
    doc/<br>
    tests/<br>
        CMakeLists.txt // #2<br>
<br>
<br>
#1 looks like<br>
cmake_minimum_required(VERSION 2.6)<br>
project(safe_numerics)<br>
if(MSVC)<br>
add_definitions(<br>
    /Gy<br>
    /wd4244 # converting &#39;std::streamsize&#39; in &#39;size_t&#39;<br>
    /D_CRT_SECURE_NO_WARNINGS<br>
    /D_SCL_SECURE_NO_WARNINGS<br>
)<br>
endif(MSVC)<br>
set(CMAKE_VERBOSE_MAKEFILE on)<br>
set(CMAKE_BUILD_TYPE Debug)<br>
message(&quot;BOOST_ROOT = $ENV{BOOST_ROOT}&quot; )<br>
include_directories($ENV{BOOST_ROOT})<br>
# walk the tests directory to run tests<br>
add_subdirectory(tests)<br>
<br>
#2 looks like<br>
ENABLE_TESTING()<br>
add_executable(test_subtract<br>
    test_subtract.cpp<br>
    test_subtract1.cpp<br>
    test_subtract2.cpp<br>
    test_subtract3.cpp<br>
)<br>
add_test(<br>
    test_subtract<br>
    test_subtract<br>
)<br>
<br>
Here is what I do<br>
<br>
cd build<br>
cmake ..<br>
$ ls -1<br>
ALL_BUILD.vcproj<br>
CMakeCache.txt<br>
CMakeFiles<br>
ZERO_CHECK.vcproj<br>
cmake_install.cmake<br>
safe_numerics.ncb<br>
safe_numerics.sln<br>
tests<br>
<br>
<br>
when I bring up safe_numerics.sln, I do see the test_subtract project, it<br>
builds and executes.<br>
<br>
BUT when I try to run CTest I get (among other stuff)<br>
<br>
$ctest<br>
*********************************<br>
No test configuration file found!<br>
*********************************<br>
...<br>
<br>
Things I&#39;ve tried.<br>
<br>
I eliminate the add_subdirectory and put all the sommand into file #1 .<br>
This did in fact build RUN_TESTS.vcproj.  But I can&#39;t see what I did wroing<br>
and what the &quot;right way&quot; to fix it is.<br>
<br>
I&#39;m lost as to what&#39;s wrong with this.  Any help appreciated.<br>
<br>
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>
</blockquote></div><br></div>