<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 21 mai 2019 à  11:45, hex <<a href="mailto:hex7c3@gmail.com">hex7c3@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<blockquote type="cite">
hello, <br>
<p>I have two modules in my CMake project:</p>
<p><i>root</i><i><br>
</i><i>├── foo</i><i><br>
</i><i>│  ├── CMakeLists.txt</i><i><br>
</i><i>│  ├── src</i><i><br>
</i><i>│  │  └── foo.c</i><i><br>
</i><i>│  └── tests</i><i><br>
</i><i>│      ├── foo_unit_test.c</i><i><br>
</i><i>│      └── CMakeLists.txt</i><i><br>
</i><i>├── CMakeLists.txt</i><i><br>
</i><i>└── moo</i><i><br>
</i><i>   ├── CMakeLists.txt</i><i><br>
</i><i>   ├── src</i><i><br>
</i><i>   │  └── moo.c</i><i><br>
</i><i>   └── tests</i><i><br>
</i><i>       ├── CMakeLists.txt</i><i><br>
</i><i>       └── moo_unit_test.c</i><i><br>
</i><br>
my root project has:</p>
<p><i>enable_testing()</i><i><br>
</i><i><br>
</i><i>add_subdirectory(adder)</i><i><br>
</i><i>add_subdirectory(viterbi_encoder)</i></p>
<p><br>
</p>
<p>and each module has:</p>
<p><i>add_subdirectory(tests)</i></p>
<p><br>
</p>
<p>For the tests I am using add_test() and make all test.<br>
</p>
<p>yet, this only runs the tests within the first
add_subdirectory. Other modules are ignored. <br></p></blockquote></div></blockquote><div>Do the CMakeLists.txt in the sub-directory have their own <font face="times new roman, serif" size="4">project</font> command or is your main top-level CMakeLists.txt the only CMakeLists.txt with <font face="times new roman, serif" size="4">project</font>Â command ?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><blockquote type="cite"><p>
</p>
<p>How can I run all tests at once?</p></blockquote></div></blockquote><div>How do yu run the tests?</div><div><br></div><div>make tests ?</div><div>ninja tests ?</div><div>ctest ?</div><div><br></div><div>What does </div><div>$ ctest -N</div><div>says?<br></div><div><br></div><div>This should work at least it "works-for-me" so there must be some difference between the CMakeLists.txt in the directory that works and in the directory that does not.</div><div>Do you have a sample setup which exhibit the issue that you can share?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF"><blockquote type="cite">
<p>Thank you in advance. <br>
</p>
</blockquote>
</div>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Eric<br></div></div></div></div></div></div>