2011/1/12 Alexey Livshits <livch...@web.de>: >> Yes, make the tests run without installation. To give more advice, we'd >> need to know more about those "dependencies". Are they other >> executables? Data files? Libraries? > > Well, if I could do that, I wouldn't ask ;) > I have 2 versions, which are built from the same sources. So I have to > have 2 different output directories. Some shared libraries are built > only for one version, but needed for both. CMake install process helps > perfectly here.
If the two "version" are needed you may build them in a single build. add_library(libv1 ${LIB_SRC}) add_library(libv2 ${LIB_SRC}) set_target_properties(libv2 PROPERTIES COMPILE_FLAGS "-DV2") add_executable(t1 t1.c) target_link_libraries(t1 libv1) add_executable(t2 t2.c) target_link_libraries(t2 libv2) add_executable(t3 t3.c) target_link_libraries(t3 libv1 libv2) so that in the same build you have the 2 versions you can directly use with add_test. add_test(Test1 t1) add_test(Test2 t2) add_test(Test3 t3) but may be I'm missing something about your "2 versions"? > Some tests require shared libraries from both versions. So I created > the new install component for tests, but I cannot address them for > CTest. Alternatively, may be you can decide that your needed "temporary" install will always be in a fixed location relative to the build tree: ${CMAKE_BINARY_DIR}/tempinstall/ then you always know where are installed the lib, executable etc... -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ 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