[CMake] Windows library target names

Michael Jackson mike.jackson at bluequartz.net
Thu Jul 22 17:54:23 EDT 2010

On Jul 22, 2010, at 5:40 PM, J Decker wrote:

> On Thu, Jul 22, 2010 at 2:37 PM, John Drescher  
> <drescherjm at gmail.com> wrote:
>> On Thu, Jul 22, 2010 at 5:25 PM, J Decker <d3ck0r at gmail.com> wrote:
>>> I'll add my two cents - I like that the names are the same, it  
>>> allows
>>> me to switch the release out with the debug and not have to  
>>> recompile
>>> the executable.
>> You are not supposed to mix debug / release dlls in the same
>> application. The reason is the debug and release crt do not always
>> play well with each other.
> it's still saved my ass a few times trying to figure out what the hell
> was going on... but then critical things that would change function
> like malloc/free I don't use, preferring instead a platform/library
> independant allocer.
>> John

I'm on the other side of that one. I don't know how many _days_ I have  
wasted because I linked my debug version with a release version of  
something else and had the strangest errors and app crashes. After  
pulling my hair out trying to debug something that does not need to be  
debugged I finally remember that I forgot to swap out libraries. It  
was at that point where I wrote all my own CMake builds for each third  
party library I use and made sure each library was decorated with  
_debug so I knew I was linking against the proper library. Have not  
had a problem since.

Mike Jackson

More information about the CMake mailing list