GoogleTestAddTests: Use 'properties' for test discovery
requested to merge ktrzcinx/cmake:ktrzcinx-modules-gtest-add-tests-use-properties-in-list-tests into master
This function is called before cmake install step, so in a case when developer builds custom shared object needed by test then it's installed in target location yet. As a result, log simillar to this may be seen:
error while loading shared libraries: soname:
cannot open shared object file:
No such file or directory
For Unix platform, convinient solution would be to setup
LD_LIBRARY_PATH
variable, which one needs to be passed for
each _TEST_EXECUTABLE
invocation. This may be realised as
a ENVIRONMENT
or ENVIRONMENT_MODIFICATION
property
given for gtest_discover_tests()
.
See issue: #21453
Signed-off-by: Trzcinski, Karol karol.trzcinski@intel.com