On Wed, Oct 5, 2016 at 12:54 PM, Nils Gladitz <nilsglad...@gmail.com> wrote: > On 04.10.2016 11:20, Tobias Hunger wrote: >> >> On Mo, 2016-10-03 at 14:25 -0400, Brad King wrote: >>>> >>>> The list we need would thus be built up to contain all COMMAND >>>> arguments to add_test that are also build targets in CMake. >>> >>> The list would also need to include targets mentioned in generator >>> expressions such as `$<TARGET_FILE:...>`. This will almost certainly >>> be better done as a CMake feature implemented in C++. This was actually >>> an early design philosophy: do the hard stuff in C++ so that complex >>> logic is not needed in CMake-language code. >> >> Access to the list of defined tests would be nice to have in the >> server-mode, >> too:-) >> >> If some work is done in that direction, please keep server-mode in mind >> when >> designing the APIs. I would love to reuse them to expose that information >> to >> clients. > > > This might be rare but the tests that cmake knows about might differ from > the tests that ctest knows about given that tests can be dynamically defined > through TEST_INCLUDE_FILE[1]. > > I've never used it that way but I was considering e.g. querying test > binaries (produced at build time) for the tests they define and making those > available dynamically when ctest processes CTestTestfile.cmake. This is in > contrast to e.g. FindGTests.cmake's GTEST_ADD_TESTS() which tries to > accomplish the same thing at configuration time by parsing test sources > instead.
+1. I wrote about that approach here: http://purplekarrot.net/blog/cmake-and-test-suites.html -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers