>> You don't have to do the copying yourself. Just tell CMake in which
>> directory it should create the module by either setting the
>> LIBRARY_OUTPUT_DIRECTORY target property or the
>> CMAKE_LIBRARY_OUTPUT_DIRECTORY variable.
>>
>> AFAIK the LOCATION property is only present for compatibility with
>> CMake 2.4, and shouldn't be used in new code.
> Hi Mike -- I don't know from which directory my module test will run when
> using ctest. So, my test program does not have an easy way to know the
> relative path to LIBRARY_OUTPUT_DIRECTORY when making the dlopen() call.
> Allowing my test program to assume the dll is in its local directory
> seemed to be the easiest solution.
Can't you put all executables and shared libraries in one directory, so they
are all local to each other?
In the top level CMakeLists.txt file just add
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
The executables you specify in ADD_TEST() will have a working directory that is
${CMAKE_CURRENT_BINARY_DIR}
Clint
_______________________________________________
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