[CMake] Change the VS linker

James Bigler jamesbigler at gmail.com
Wed Jun 20 15:19:20 EDT 2012


Asking around here at NVIDIA, it looks like you can replace the linker in
VS 2010 (MSBuild probably has the ability), but VS 2008 doesn't support
this.

On Wed, Jun 20, 2012 at 12:53 PM, David Cole <david.cole at kitware.com> wrote:

> The VS generator does not use that variable, and I don't know the exact
> answer to how this is computed everywhere...
>
> But I strongly suspect that VS simply uses "link.exe" and uses the first
> one found within whatever environment is set up in Visual Studio.
>
> To see the environment that is available at build time, you could add a
> custom target like this:
>
>   add_custom_target(EchoEnv ${CMAKE_COMMAND} -E environment)
>
>
> HTH,
> David
>
>
> On Wed, Jun 20, 2012 at 2:45 PM, James Bigler <jamesbigler at gmail.com>wrote:
>
>> Is it possible to change what executable is used for linking in VS
>> targets?
>>
>> I see CMAKE_LINKER, but the variable says "CMAKE_LINKER-NOTFOUND", which
>> leads me to believe that the VS generator doesn't use this variable.
>>
>> Thanks,
>> James
>>
>> --
>>
>> 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/20120620/509d50a4/attachment.htm>


More information about the CMake mailing list