On Mon, Aug 31, 2009 at 1:08 AM, King, Steven R <[email protected]>wrote:
> I now put all my binaries and libraries in ${CMAKE_BINARY_DIR}/bin as Clint
> suggested. This caused ctest to fail for lack of knowing where the test
> binary went. I made this adjustment:
>
> add_test (
> test_my_module
> ${CMAKE_BINARY_DIR}/bin/test_my_module
> )
>
> which allowed ctest to find the executable. However, the executable still
> can't find the dll, since ctest runs the test from
> ${CMAKE_CURRENT_BINARY_DIR} which is apparently not equal to
> ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}. As we've just belabored, putting the dll
> in ${CMAKE_CURRENT_BINARY_DIR} is neither easy nor well advised.
>
> OK, now I'm actually getting worried. Any other ideas, please?
What we do at work is generate the test binaries in
CMAKE_RUNTIME_OUTPUT_DIRECTORY as well. This does tend to clutter up that
directory but they don't get make installed so it's not a huge issue for us.
You might be able to use the ENVIRONMENT test property to append to the PATH
environment variable CMAKE_RUNTIME_OUTPUT_DIRECTORY. This would allow the
test binaries (in theory) to find their dependent DLLs while not existing in
CMAKE_RUNTIME_OUTPUT_DIRECTORY.
--
Philip Lowman
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake