http://bugs.orocos.org/show_bug.cgi?id=866
Summary: Can't run RTT unit tests without installing
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P3
Component: Tests
AssignedTo: orocos-dev [..] ...
ReportedBy: philippe [dot] hamelin [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
On Windows, we need to install RTT to be able to run tests. Otherwise, the unit
tests can't find all DLLs. There's no RPATH on Windows, so we need to correctly
set the PATH in order to execute all tests correctly. Actually, some DLLS are
build inside their own build subfolder, while some other (plugins, typekits)
are copied inside the build/[types,plugins] folders. There's two approaches to
solve that problem:
1) Put all libraries in build/lib and executables (including DLL on windows) in
build/bin
This can be configured with a global configuration, e.g.:
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
Then, all unit tests will find their required DLLs inside the same directory.
2) Explicitly set PATH when running tests
We could use this approach:
http://www.cmake.org/pipermail/cmake/2009-May/029464.html
But this should required to know ALL paths of binaries and be able to set them
for each configuration in MSVC (Debug, Release, etc.).
IMO, I think that solution #1 is the best approach but I don't know if this
have any side effects on other platform?