[CMake] Change the VS linker

David Cole david.cole at kitware.com
Wed Jun 20 14:53:44 EDT 2012


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/eb97fad6/attachment.htm>


More information about the CMake mailing list