Set CMAKE_*_OUTPUT_DIRECTORY to run tests without installing.

Authored by dfaure on Aug 8 2017, 8:43 AM.

Description

Set CMAKE_*_OUTPUT_DIRECTORY to run tests without installing.

Summary:
For compatibility reasons, this is only enabled when projects
upgrade their find_package(ECM) line to request a version >= 5.38.
A little bit like cmake policies: just upgrading ECM is compatible,
while increasing the required version can change behaviour.

Test Plan:
Tested make test in all KF5 frameworks; I have patches
for some of them which I can't commit until this is in.

Reviewers: cgiboudeaux, kfunk

Reviewed By: cgiboudeaux, kfunk

Subscribers: kfunk, Frameworks, Build System

Tags: Frameworks, Build System

Differential Revision: https://phabricator.kde.org/D7198

Details