[CMake] Setting up working directory for target

William A. Hoffman billlist at nycap.rr.com
Wed Mar 8 07:52:44 EST 2006


I don't think CMake can help here.   That is not stored in the .sln or the
vcproj.  It is stored in some binary file that is used to keep the state.
So unless someone figures out that format or finds an API for it, I think
we will be unable to add that feature.

-Bill


At 06:38 AM 3/8/2006, Asmodehn Shade wrote:
>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 <<mailto:billlist at nycap.rr.com>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
>
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake 



More information about the CMake mailing list