It isn't as bad as I might have made it sound. e.g.:
add_executable(mytest test.cpp)
set_target_properties(mytest PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_BINARY_DIR})
add_test(mytest ${CMAKE_BINARY_DIR}/mytest)
On unix (I'm not sure about all but at least on gnu linux) CMake
"tweaks" by embedding library paths into executables (RPATH) which
allows the OS to use those paths at runtime.
As far as I know there is no equivalent feature on windows(?)
Nils
On 10/20/2012 01:21 PM, Martin Sustrik wrote:
On 19/10/12 11:14, Nils Gladitz wrote:
I use ${CMAKE_BINARY_DIR} in my RUNTIME_OUTPUT_DIRECTORY and also in my
explicit test paths in add_test.
I function wrapped the add_executable and add_test calls to take care of
it so the test definitions themselves are more compact and readable.
Ok. However, what I need seems to be the most basic use case: build a
library and run some tests.
Any way to do that without all the tweaks?
For example, on UNIX platforms everything works OK with no tweaks
whatsoever.
Martin
--
Nils Gladitz, B.Sc.
DICOM, Konnektivität und Entwicklung
Scivis wissenschaftliche Bildverarbeitung GmbH
Bertha-von-Suttner-Str. 5
D-37085 Göttingen
GERMANY
Handelsregister Nr. / Trade Register No. B3100 Göttingen
Geschäftsführer / Managing Directors Dr. Gernot Ebel, Dr. Uwe Engeland
Tel: 0049 (0)551 634181-28
E-Mail: glad...@scivis.de
Web: www.scivis.de
--
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