[CMake] Setting up working directory for target

Asmodehn Shade asmodehn at gmail.com
Wed Mar 8 06:38:34 EST 2006


Working Directory is just the path to run the executable target from in
debug mode.
In VS 8 for example :
Project -> Properties -> Debugging -> Working directory

At the moment instead of having the working directory setup to the right
directory, I have to copy my datafiles in the directory where the build exe
end up. But maybe this is actually the right way to do it if you want you
build process to work as well with GNUmake...

To be a bit more specific :
/data/file.dat
/src/main.cpp
/Debug/target.exe

Target needs to access data/file.dat. I need to run it from / not from
/Debug when I am debugging it.
At the moment I copy /data/* in /Debug/data/, and maybe it s actually the
best way, dont know.

I was wondering if somebody had already thought about it...


2006/3/7, William A. Hoffman <billlist at nycap.rr.com>:
>
> At 10:15 PM 3/5/2006, Asmodehn Shade wrote:
> >Hi everyone,
> >
> >I am wondering how I can set the "Working Directory" of some targets
> using CMake.
> >
> >Currently SET_TARGET_PROPERTIES doesnt seem to know about it (from the
> doc on the web) does it ?
> >
> >I just need it to be able to run my teststuff.exe from the right
> directory using VS for debug, and not from some "test\Debug\"
> subdirectory...
> >Although I dont know how this should behave with GNUmake...
> >Maybe I am not looking at the right cross-platform solution, am I ?
> >
> >Thank a lot for your advices !
>
> I am not sure what you mean by the working directory for a target.
> Is this for running a custom command?
>
> -Bill
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20060309/6753949f/attachment.htm


More information about the CMake mailing list