[CMake] add_test and locating dependent DLL's on Windows

Tyler Roscoe tyler at cryptio.net
Tue May 12 11:43:03 EDT 2009


On Tue, May 12, 2009 at 11:18:32AM -0400, Scott Gray wrote:
> 1. I can copy the tests into a staging environment so that they are 
> sitting along side the DLL's prior to running them.
> 2. I saw that there is an upcoming feature in the CVS tree in which 
> environment variables can be set for tests.  If this is the case, then I 
> could see if setting the PATH for the test case can work.

I haven't followed this thread closely, but we have a similar problem.
We are currently trying to resolve it by writing a python script that
sets up the environment ($PATH, copying license files and other needed
stuff into a known and stable location) and then runs the test. The
python script has some @VAR@ sections so that it can be "filled out" by
CMake. This system isn't done so unfortunately I can't share it right
now (or even tell you how well it works).

> >There is actually a possibility to tell Visual C++ directly where the
> >DLL is located (by changing the PATH variable for one configuration
> >inside VS), but I don't remember right now how and I'm just on the
> >wrong OS right now to have a look.
> >  
> 
> Obviously I want to avoid having the developer manually editing the 
> project that cmake has produced, so if such a feature exists, I'd like 
> to track down how to make cmake spit it out for me.

I thought that those settings were kept inside the .suo or .user file
and thus couldn't be controlled by CMake? I might be completely wrong
about this though.

tyler


More information about the CMake mailing list