<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Feb 9, 2016 at 10:15 AM Gilles Khouzam <<a href="mailto:Gilles.Khouzam@microsoft.com">Gilles.Khouzam@microsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to understand what is necessary to make this work. I'll circle back when I find out more information.<br>
<br>
-----Original Message-----<br>
From: Brad King [mailto:<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>]<br>
Sent: Monday, February 8, 2016 10:32<br>
To: Yi-Hong Lyu <<a href="mailto:b95705030@ntu.edu.tw" target="_blank">b95705030@ntu.edu.tw</a>><br>
Cc: <a href="mailto:cmake-developers@cmake.org" target="_blank">cmake-developers@cmake.org</a>; Gilles Khouzam <<a href="mailto:Gilles.Khouzam@microsoft.com" target="_blank">Gilles.Khouzam@microsoft.com</a>><br>
Subject: Re: [cmake-developers] Question related to Visual Studio 14 2015 [MyTarget]<br>
<br>
On 02/05/2016 02:41 PM, Yi-Hong Lyu wrote:<br>
> 1. What I need to do is to add an option MyTarget for arch of "Visual<br>
> Studio 14 2015 [arch]", just like "Visual Studio 14 2015 [Win64]"<br>
> or "Visual Studio 14 2015 [ARM]"?<br>
<br>
Naming the architecture as part of the generator name is a legacy behavior.<br>
See the "-A <arch>" option.<br>
<br>
> 2. How can I support cl.exe and clang-cl.exe by Visual Studio 14 2015 [MyTarget]"?<br>
> Should I add options cl.exe/clang-cl.exe for toolset-name of "-T <toolset-name>"?<br>
<br>
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.<br>
<br>
> 3. Is there any way to make sure that all x86/x64 headers/libraries are not included/linked?<br>
> I'd like only include/link headers/libraries of MyTarget.<br>
<br>
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.<br></blockquote><div><br></div><div>I've been experimenting with this lately. When building with NMake, adding the</div><div>flag "-fms-compatibility-version=19.00.23506" got clang to act like the right version</div><div>of MSVC. MSVC 2013 is the default right now.</div><div>When building with the generator "Visual Studio 14 2015 Win64", adding the toolset</div><div>flag "-TLLVM-vs2014" got clang to work.</div><div><a href="https://github.com/boostorg/hana/wiki/Setting-up-Clang-on-Windows">https://github.com/boostorg/hana/wiki/Setting-up-Clang-on-Windows</a> was really</div><div>helpful in figuring some of this out.</div><div>All that aside, seamless interaction between clang-cl and MSVC 2015 is definitely</div><div>still a work in progress.</div><div><br></div><div>Best,</div><div>-Ian Henriksen</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-Brad<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/cmake-developers</a><br>
</blockquote></div></div>