<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Dear users,</p>
<p>I'm new to the build system. I am trying to create the target
`test' to run all test suites. I'm using GoogleTest to make a test
suite:</p>
<p>in test/CMakeLists.txt</p>
<pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:11.3pt;">file(<span style="color:#008000;font-weight:bold;">GLOB test_files LIST_DIRECTORIES false *.cpp</span>)
add_executable(<span style="color:#008000;font-weight:bold;">test_driver ${test_files}</span>)
target_link_libraries(<span style="color:#008000;font-weight:bold;">test_driver gtest_main</span>)
add_test(<span style="color:#008000;font-weight:bold;">NAME test_driver COMMAND test_driver</span>)
in /CMakeLists.txt
add_subdirectory(<span style="color:#008000;font-weight:bold;">test</span>)
</pre>
<p>this effectively creates the test suite so that can be invoked
through test/test_driver. However I thought that the suite, at
least if I set the param EXCLUDE_FROM_ALL in add_executable, would
be built and executed as part of `make test', similarly to `make
check' in AutoTools builds.<br>
</p>
<p>What is the correct way to integrate the test suite with CTest?<br>
<br>
Thanks,</p>
<p>Quaquaraqua<br>
</p>
</body>
</html>