[CMake] Win32 linker line problems...

Brad King brad.king at kitware.com
Tue Apr 19 13:53:57 EDT 2005


Lars Pechan wrote:
> Hello,
> I use CMake in a project where I build lots of static libs that are 
> later linked together to an app. In order to check this app for leaks I 
> use VisualLeakDetector 
> (http://www.codeproject.com/useritems/visualleakdetector.asp) which 
> requires the app to be compiled with /MTd. This causes some problems in 
> a few places and I end up with multiply defined stuff from the C runtime 
> libs so I set up
> 
> CMAKE_EXE_LINKER_FLAGS_DEBUG
> CMAKE_MODULE_LINKER_FLAGS_DEBUG
> CMAKE_SHARED_LINKER_FLAGS_DEBUG
> 
> to all be "/debug /NODEFAULTLIB:LIBCMT.LIB /FORCE:MULTIPLE".
> 
> This works fine when using the NMake Makefiles generator. Unfortunately, 
> when using the "Visual Studio 7.NET 2003" generator these settings seem 
> to be ignored. In Visual Studio I can't see my flags having any effect 
> at all when I look in the linker properties. Not sure why but I was 
> under the impression that these flags should just be added to the linker 
> command line options?

Please submit this as a bug report here:

http://www.cmake.org/Bug

Thanks,
-Brad


More information about the CMake mailing list