[CMake] Weird binary directory problem

Tyler Roscoe tyler at cryptio.net
Wed Jun 3 16:00:49 EDT 2009


Please don't top-post.

> 2009/6/3 Tyler Roscoe <tyler at cryptio.net>:
> > Sounds like you must have overriden the default destination directory.
> > Did you set EXECUTABLE_OUTPUT_PATH (or the related target property)?

On Wed, Jun 03, 2009 at 08:59:11PM +0200, Steven Van Ingelgem wrote:
> Yes, but only for the base-project, not for the project where I did an
> "add_subdirectory" for...

That sentence confuses me but any variables (like
EXECUTABLE_OUPTUT_PATH) set in the parent scope (your base project) will
be propagated to the children (the thing which you add_subdirectory()).

So if your base CMakeLists is like this:

set (EXECUTABLE_OUPTUT_PATH "some/path/to/bin")
...
add_subdirectory (other_buildable)

then other_buildable will inherit its EXECUTABLE_OUTPUT_PATH from the
parent.

tyler


More information about the CMake mailing list