[cmake-developers] Question related to Visual Studio 14 2015 [MyTarget]
Ian Henriksen
insertinterestingnamehere at gmail.com
Tue Feb 9 15:32:20 EST 2016
On Tue, Feb 9, 2016 at 10:15 AM Gilles Khouzam <Gilles.Khouzam at microsoft.com>
wrote:
> I'm trying to understand what is necessary to make this work. I'll circle
> back when I find out more information.
>
> -----Original Message-----
> From: Brad King [mailto:brad.king at kitware.com]
> Sent: Monday, February 8, 2016 10:32
> To: Yi-Hong Lyu <b95705030 at ntu.edu.tw>
> Cc: cmake-developers at cmake.org; Gilles Khouzam <
> Gilles.Khouzam at microsoft.com>
> Subject: Re: [cmake-developers] Question related to Visual Studio 14 2015
> [MyTarget]
>
> On 02/05/2016 02:41 PM, Yi-Hong Lyu wrote:
> > 1. What I need to do is to add an option MyTarget for arch of "Visual
> > Studio 14 2015 [arch]", just like "Visual Studio 14 2015 [Win64]"
> > or "Visual Studio 14 2015 [ARM]"?
>
> Naming the architecture as part of the generator name is a legacy behavior.
> See the "-A <arch>" option.
>
> > 2. How can I support cl.exe and clang-cl.exe by Visual Studio 14 2015
> [MyTarget]"?
> > Should I add options cl.exe/clang-cl.exe for toolset-name of "-T
> <toolset-name>"?
>
> The -T option is indeed the CMake side of it. I'm not familiar with what
> else has to be done on the host to make VS understand the toolset name
> though.
>
> > 3. Is there any way to make sure that all x86/x64 headers/libraries are
> not included/linked?
> > I'd like only include/link headers/libraries of MyTarget.
>
> CMake doesn't add any system include directories or link directories. For
> command line builds those need to be part of the environment. For VS IDE
> builds they are made available by the IDE when running the toolchain based
> on the options discussed above.
>
I've been experimenting with this lately. When building with NMake, adding
the
flag "-fms-compatibility-version=19.00.23506" got clang to act like the
right version
of MSVC. MSVC 2013 is the default right now.
When building with the generator "Visual Studio 14 2015 Win64", adding the
toolset
flag "-TLLVM-vs2014" got clang to work.
https://github.com/boostorg/hana/wiki/Setting-up-Clang-on-Windows was really
helpful in figuring some of this out.
All that aside, seamless interaction between clang-cl and MSVC 2015 is
definitely
still a work in progress.
Best,
-Ian Henriksen
>
> -Brad
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160209/0e1f425a/attachment-0001.html>
More information about the cmake-developers
mailing list