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

2016-02-09 Thread Ian Henriksen
On Tue, Feb 9, 2016 at 10:15 AM Gilles Khouzam <gilles.khou...@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.k...@kitware.com]
> Sent: Monday, February 8, 2016 10:32
> To: Yi-Hong Lyu <b95705...@ntu.edu.tw>
> Cc: cmake-developers@cmake.org; Gilles Khouzam <
> gilles.khou...@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 " 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
> "?
>
> 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
>
-- 

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

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

2016-02-09 Thread Gilles Khouzam
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.k...@kitware.com] 
Sent: Monday, February 8, 2016 10:32
To: Yi-Hong Lyu <b95705...@ntu.edu.tw>
Cc: cmake-developers@cmake.org; Gilles Khouzam <gilles.khou...@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 " 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 
> "?

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

-- 

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


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

2016-02-08 Thread Brad King
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 " 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 
> "?

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

-- 

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


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

2016-02-05 Thread Yi-Hong Lyu
Hello all,

I am a cmake newbie. Now I have two compiler that target MyTarget. The
first one is a modified cl.exe, and the other one is the clang-cl.exe.
Because they don't target x86/x64, both headers/libraries are supposed not
to be included/linked. Instead I just want to include/link
headers/libraries of MyTarget. Here are my some questions:

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]"?
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 "?
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.

Thanks for your reply, any comments are welcomed.
Yi-Hong
-- 

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