[CMake] TARGET_LINK_LIBRARIES debug and optimized

Ken Martin ken.martin at kitware.com
Tue Jul 5 09:01:21 EDT 2005


> Ok, the problem is in cmLocalGenerator::OutputLinkLibraries:
> 
> if(buildType == "DEBUG")
>     {
>     cmakeBuildType = cmTarget::DEBUG;
>     }
> if(buildType.size())
>     {
>     cmakeBuildType = cmTarget::OPTIMIZED;
>     }
> 
> Shouldn't that be
> 
> if(buildType == "DEBUG")
>     {
>     cmakeBuildType = cmTarget::DEBUG;
>     }
> else if(buildType.size())
>     {
>     cmakeBuildType = cmTarget::OPTIMIZED;
>     }
> 
> or
> 
> 
> if(buildType == "DEBUG")
>     {
>     cmakeBuildType = cmTarget::DEBUG;
>     }
> else
>     {
>     cmakeBuildType = cmTarget::OPTIMIZED;
>     }
> 

It should be the first case. If nothing is specified then it is GENERAL, one
lib for any build type. I have checked in the fix.  Good eye Filipe.

Thanks
Ken




More information about the CMake mailing list