working directory when running binary

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

working directory when running binary

stefan)
Hi cmakers,

I am hitting some bumps trying to make my cmake generates project
files to behave like they should. I am working with xcode, vs9 2008,
and code::blocks (linux). In all but code::blocks I can build my
project and run it. The problem is with resource files. While the
working directory is usually set to where the executable is, in
code::blocks it is set where the project file is. This basically makes
it impossible for me to do out-of-source builds unless there is a way
to control the working directory of the executable.

I know how to set this from code::blocks itself but how do I define
this from the CMakeLists.txt?

Help appreciated,
Best,

/stefan
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: working directory when running binary

Alexander Neundorf-3
On Sunday 13 September 2009, stefan) wrote:

> Hi cmakers,
>
> I am hitting some bumps trying to make my cmake generates project
> files to behave like they should. I am working with xcode, vs9 2008,
> and code::blocks (linux). In all but code::blocks I can build my
> project and run it. The problem is with resource files. While the
> working directory is usually set to where the executable is, in
> code::blocks it is set where the project file is. This basically makes
> it impossible for me to do out-of-source builds unless there is a way
> to control the working directory of the executable.
>
> I know how to set this from code::blocks itself but how do I define
> this from the CMakeLists.txt?

Please put this in the bug tracker and assign it to me.
Ideally with a tiny sample project which shows the problem.

Thanks
Alex
_______________________________________________
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