[cmake-developers] Question related to Visual Studio 14 2015 [MyTarget]

Gilles Khouzam Gilles.Khouzam at microsoft.com
Tue Feb 9 12:15:05 EST 2016


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.

-Brad



More information about the cmake-developers mailing list