I am trying to run test on Windows (using the NMake generator and Visual Studio) and encounter several problems:
First 'nmake test' does not run the tests, as it does on other platforms (Unix w/ make generators). Then, when I manually run ctest from the PROJECT_BINARY_DIR, the test will fail because the dependent libraries (dynamic libraries generated by the target) are not in the path. On Unix platform, I do not have the issue: the rpath is set correctly when I use the target_link_libraries(). What should I do on Windows? The only solution I see for the moment is to 'nmake install' the tests and run fixup_bundle() on them. Another solution is to manually maintain the list of path of DLLs and try to pass it to CTest. But I cannot find a way to do that from cmake. Besides, those DLLs are scattered around the build tree. Another solution would be to force all libraries and binaries in a single directory using the RUNTIME_OUTPUT_DIRECTORY variable. What would you recommend? PS: It is pretty common to generate a library that is linked with a main executable, and linked with a test executable. I am pretty sure this is handled by cmake/ctest. _______________________________________________ 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