[CMake] ctest - Can it "make DESTDIR=./test_dir install" to a dir and run tests there?
Tyler Roscoe
tyler at cryptio.net
Mon Sep 21 14:23:38 EDT 2009
On Mon, Sep 21, 2009 at 11:04:47AM -0600, Dixon, Shane wrote:
> I have a project that I want to use cmake with, but the project builds
> several DLL's and uses several .pem certificates that all need to be
> in the same directory before the application can run. As things stand
> right now, I run "nmake test" and all my tests fail because my
> application doesn't have all of the dependencies it needs to run. If
> I run a "nmake install" it puts all the dependencies where they belong
> and the program runs.
The other thread I just posted in talks about some of the details about
copying runtime files around during installation.
> Is there any way of telling ctest that I want to do a "nmake
> DESTDIR=./test_dir install" and then run all the ctests from the
> applications installed into that directory?
I posted a sample add_custom_target in the other thread whereby you can
cause install rules to run during build time. Maybe that will get you
started?
Otherwise, you could write a wrapper script that sets up the environment
you need and then runs CTest. You can even use add_test() so that CTest
will run your wrapper script for you when it runs.
tyler
More information about the CMake
mailing list