Re: [CMake] Labels on tests defined on another subdirectory

2018-09-19 Thread Marc CHEVRIER
Using command 'get_directory_property(var DIRECTORY ${my_dir} TESTS)' is OK to retrieve tests defined in some sub directory. But, it is useless because command 'set_test_properties()' must be called from the directory where the tests are defined. but you can do: set (MY_LABELS LABEL1)

Re: [CMake] Labels on tests defined on another subdirectory

2018-09-19 Thread Raffi Enficiaud
On 19.09.18 08:25, Marc CHEVRIER wrote: directory property 'TESTS' returns the tests created in the *current* directory only. The main reason to this limitation is the fact that tests created in different directories can have same name. The get_directory_property call is made from the

Re: [CMake] Labels on tests defined on another subdirectory

2018-09-19 Thread Marc CHEVRIER
directory property 'TESTS' returns the tests created in the *current* directory only. The main reason to this limitation is the fact that tests created in different directories can have same name. Le mer. 19 sept. 2018 à 02:22, Raffi Enficiaud < raffi.enfici...@mines-paris.org> a écrit : > Hi,

[CMake] Labels on tests defined on another subdirectory

2018-09-18 Thread Raffi Enficiaud
Hi, I just wanted to know if it is possible from a directory to add labels on tests defined on a sub-directory (via add_subdirectory). When I do a set_tests_properties on the tests that were retrieved with get_directory_property, cmake says that the test is not found. Maybe I am missing