[cmake-developers] Question related to Visual Studio 14 2015 [MyTarget]
Brad King
brad.king at kitware.com
Mon Feb 8 13:32:25 EST 2016
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