[CMake] exe and dll vs. pdb and idb files (was RE: CMAKE_RUNTIME_OUTPUT_DIRECTORY without the extra'Debug' or 'Release' ?)

David.Karr at L-3COM.COM David.Karr at L-3COM.COM
Thu Mar 25 13:51:10 EDT 2010


This seems to work for me, too: with a few SET commands, I persuaded
CMake 2.8.1 to put all my .exe and .dll files (from one Visual Studio
2008 "solution") in one directory, and all my .lib files in another
directory, without any "Debug" or "Release" directory name in either
path.

 

BUT ...

 

... and let me emphasize, BUT ...

 

It also put all the .pdb and .idb files in the same directory as the
.exes and .dlls.  So I now have about three times as many files in that
directory as before, making it a little harder to assess what's there.
Moreover, for a typical library, call it xyzzy, the combined sizes of
xyzzy.pdb plus xyzzy.idb add up to about 20 times the size of xyzzy.dll
in the Release configuration-and all of that is now being dumped into
that one directory. This is really obnoxious.

 

One thing you can do with one directory full of .exe and .dll files is
to copy it somewhere else-to an arbitrary directory on another computer,
for example-and run the software there.  Now the transfer time and disk
storage required for this have just increased about 2000%.

 

This is the main reason why I asked last year for independent control
over where the .pdb files are written (and I should have included .idb
files in that request). Actually I don't really need to redirect the
.pdb outputs separately from all other output; I'd be happy enough (in
this case at least) if they just went to the same place as the .obj
files. What I really want is to control where the executable
files-emphasis on executable-are built, separately from all the other
files that I don't really need at run time.

 

David Karr

 

 

From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Erwin Coumans
Sent: Monday, February 08, 2010 1:46 PM
To: David Cole
Cc: Brad King; cmake at cmake.org
Subject: Re: [CMake] CMAKE_RUNTIME_OUTPUT_DIRECTORY without the
extra'Debug' or 'Release' ?

 

I'm not using SET_TARGET_PROPERTIES,

 

SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BULLET_PHYSICS_SOURCE_DIR})

SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE
${BULLET_PHYSICS_SOURCE_DIR})

 

seems to work just fine for all targets with CMake 2.8.1.

Thanks,

Erwin

 

On 8 February 2010 10:44, David Cole <david.cole at kitware.com> wrote:

You have to set the target property to set the directories to something
of your own choosing.

 

CMake will always use Debug and Release by default for Visual Studio and
Xcode, since they are multi-configuration development environments...

 

 

On Mon, Feb 8, 2010 at 1:40 PM, Erwin Coumans <erwin.coumans at gmail.com>
wrote:

	 

	No, I just tried CMake 2.8.1 and it still adds 'Debug' and
'Release' directories to the name.

	 

	Are you sure it has been fixed?

	Thanks a lot,

	Erwin

	 

	On 8 February 2010 05:43, Brad King <brad.king at kitware.com>
wrote:

	Erwin Coumans wrote:
	>
	> Hi,
	>
	> How can we specify the actual directory where the executable
ends up in
	> MSVC, without any messing around by adding 'Debug' or
"Release'?
	>
	> I tried the following lines:
	>
	> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY
${BULLET_PHYSICS_SOURCE_DIR})
	> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE
${BULLET_PHYSICS_SOURCE_DIR})
	> SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG
${BULLET_PHYSICS_SOURCE_DIR})
	>
	> But the generated MSVC projectfiles still add 'Debug',
'Release' to the
	> directory. How can this additional 'Debug' or 'Release' be
removed?

	Coincidentally this is already implemented and is going to be in
2.8.1.
	
	http://www.cmake.org/Bug/view.php?id=9163
	
	-Brad

	 

	 

	_______________________________________________
	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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100325/7886bec4/attachment.htm>


More information about the CMake mailing list