Raises the cmake requirement to 3.5.0 (released in March 2016) but
we don't need to manually mess with INCLUDE_DIRS and linking to a
thread library anymore.
fixes tests under sydbox
escaped to make it take the value when the test is being run not when
the command is generated
Change-Id: I86d7b8a4d4e142dc3ef912b09aaa52c96b1d8a50
Our required cmake version is new enough (>=3.1) and usage of the
imported target is recommended by cmake's documentation [1]. Furthermore,
according to the docs THREADS_PREFER_PTHREAD_FLAG can only be used
with the imported target.
[1] https://cmake.org/cmake/help/v3.7/module/FindThreads.html
In the case the googletest library is built static and was built with threading,
the library may have an implicit dependency which is unrecorded. Add an
explicit link against the threading library. The slight overlinkage is
inconsequential as it is for tests only.