Skip to content

GoogleTestAddTests: Use 'properties' for test discovery

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

Merge request reports