elmindreda/Wendy — pull request #6 by tapio (2011-11-07 10:12:14+00:00)
Title: Revised exe run path patch

Your commit c5b6bdf5c46 "Made tests and examples run from tree root." makes hacking difficult with a build dir. Consider these four case:

1. When I started with Wendy:
(at build dir): make && ./tests/deferred

2. After my 'cmake-stuff' pull request branch modifications:
(at build dir): make && ./deferred
Also, double clicking the exe from graphical file browser works and Qt Creator can run targets without any special path configuration.

3. Now in your master:
(at source root): make -C builddir && ./builddir/tests/deferred
Typing this stuff gets tiresome (of course there is shell history, but surprisingly often the line gets buried somewhere far behind when doing some extensive grepping or diffing or what not.
And double clicking won't work and IDE must be configured to set the working directory of the apps.

4. In this 'path-stuff' branch:
When using build dir, everything works beautifully as in case 2.
However, if someone wants to put CMakeFiles directories and other crap all over the source tree and not use a build dir, that case is auto-detected and enhanced too:
(at source root): make && ./tests/deferred (as was in case 3 after your modifications, so exe paths are not modified).
But now you can also double click the exes in their tests/ or examples/ dirs and it works!