LABELS directory property doesn't affect tests if WORKING_DIRECTORY is set
According to the docs for the LABELS directory property:
Specify a list of text labels associated with a directory and all of its subdirectories. This is equivalent to setting the LABELS target property and the LABELS test property on all targets and tests in the current directory and subdirectories.
If I set the LABELS directory property, I see that a line like the following gets added to the end of the CTestTestfile.cmake
in the corresponding binary directory:
set_directory_properties(PROPERTIES LABELS "LongRunning")
This places it after all the tests and subdirs have been added/defined. If you do a ctest --print-labels
it confirms the problem because it says "No Labels Exist". I presume this needs to end up being put at the start of the CTestTestfile.cmake
file rather than the end of it?
I'm testing with 3.14.0-rc3, but I haven't verified if earlier versions also have this issue.