[CMake] Output directory

Tyler Roscoe tyler at cryptio.net
Fri Dec 5 16:14:39 EST 2008


On Fri, Dec 05, 2008 at 03:53:11PM -0500, David.Karr at L-3COM.COM wrote:
> So, for example, you can get some of the intermediate files to be
> written to component1/build/obj/Release, but you can't get them written
> directly to component1/build/obj.  Unless you are willing to download
> 
> I complained about this last month, but you finally spurred me to enter
> the complaint in the CMake bug tracker.  It's issue number 8243:
> 
> http://public.kitware.com/Bug/view.php?id=8243

I can't figure out how to add my support to this bug (perhaps I need to
make an account for the kitware Mantis site?), but this is something
that affects me and that I would love to see repaired.

I am using cmake to support builds on Unix and Windows platforms, and
the inconsistency in where my executables end up (${CMAKE_BINARY_DIR} vs
${CMAKE_BINARY_DIR}/Debug) is detrimental to writing good scripts.

If this issue cannot be fixed easily, I guess I'll need to wrap all my
functions with some platform-specific IFs?

if(${WIN32})
    set (PATH_TO_FOO_EXE /path/to/foo/Debug)
else(${WIN32})
    set (PATH_TO_FOO_EXE /path/to/output)
endif(${WIN32})

This is obviously a pain, so it would be nice if *_OUTPUT_PATH behaved
consistently across platforms.

Failing that, is there a better approach than a big tree of IFs?

Thanks,
tyler


More information about the CMake mailing list