Re: [CMake] How to generate for Ninja + MSVC?

2015-12-03 Thread Bill Hoffman

On 12/2/2015 10:39 PM, iosif neitzke wrote:

Ah, okay, thanks.  From cmake-gui the solution equivalent would be
selecting the Ninja generator but specifying native compilers (cl.exe
for this example) instead of using the default native compilers?
.
Yes, that would work as well.  As long as cmake-gui was run in an 
environment that had the compiler setup to work from the command line.


-Bill

--

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
On Wed, Dec 2, 2015 at 1:29 PM, Nils Gladitz  wrote:
> On 02.12.2015 20:18, Robert Dailey wrote:
>>
>> Is there a way to generate for Ninja using MSVC toolchain? If so, how
>> do I do that? Do I need a toolchain file?
>
>
> You can select the Ninja generator (e.g. cmake -G Ninja) while running cmake
> from the desired Visual Studio command line environment.

This doesn't work unfortunately; it still finds GNU 4.8.3 compiler somehow.
-- 

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Nils Gladitz

On 02.12.2015 20:18, Robert Dailey wrote:

Is there a way to generate for Ninja using MSVC toolchain? If so, how
do I do that? Do I need a toolchain file?


You can select the Ninja generator (e.g. cmake -G Ninja) while running 
cmake from the desired Visual Studio command line environment.


Nils
--

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


[CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
Is there a way to generate for Ninja using MSVC toolchain? If so, how
do I do that? Do I need a toolchain file?
-- 

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Robert Dailey
On Wed, Dec 2, 2015 at 1:37 PM, Robert Dailey  wrote:
> On Wed, Dec 2, 2015 at 1:29 PM, Nils Gladitz  wrote:
>> On 02.12.2015 20:18, Robert Dailey wrote:
>>>
>>> Is there a way to generate for Ninja using MSVC toolchain? If so, how
>>> do I do that? Do I need a toolchain file?
>>
>>
>> You can select the Ninja generator (e.g. cmake -G Ninja) while running cmake
>> from the desired Visual Studio command line environment.
>
> This doesn't work unfortunately; it still finds GNU 4.8.3 compiler somehow.

For some reason Strawberry Perl installed gcc/g++ to my PATH. I
removed this and it's finding MSVC 19 now. Thanks.
-- 

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Bill Hoffman

On 12/2/2015 2:39 PM, Robert Dailey wrote:

For some reason Strawberry Perl installed gcc/g++ to my PATH. I
removed this and it's finding MSVC 19 now. Thanks.


Could also set CC and CXX to cl before running CMake.


--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
--

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread Bill Hoffman

On 12/2/2015 8:22 PM, iosif neitzke wrote:

Isn't this what Generator Toolset selection is for?

ex. cmake -G Ninja -T v140

http://cmake.blogspot.com/2013/05/cmake-2811-available-for-download.html
No, that is for telling the VS IDE which tool set to use.  It has no 
effect on the Ninja generator.  Like makefiles the ninja generator 
assumes it is running in an environment that is setup to run a compiler 
from the command line.  If there is more than one compiler it picks one. 
 If you have more than one compiler you can force it to pick one over 
the other with CC and CXX variables.   The IDE has its own environment 
for the compiler and some IDEs support more than one tool chain and the 
-T is how you tell it to use something other than its default.


-Bill

--

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread CHEVRIER, Marc
Alternate solution is to define following environment variables:
* CC=cl.exe
* CXX=cl.exe

In this case, CMake will search these compilers rather than the standard 
choices (starting with c++ and g++ for C++ language).

And you don’t have any longer constraints about your environment.
 
Marc




On 02/12/15 20:39, "CMake on behalf of Robert Dailey"  wrote:

>On Wed, Dec 2, 2015 at 1:37 PM, Robert Dailey  wrote:
>> On Wed, Dec 2, 2015 at 1:29 PM, Nils Gladitz  wrote:
>>> On 02.12.2015 20:18, Robert Dailey wrote:

 Is there a way to generate for Ninja using MSVC toolchain? If so, how
 do I do that? Do I need a toolchain file?
>>>
>>>
>>> You can select the Ninja generator (e.g. cmake -G Ninja) while running cmake
>>> from the desired Visual Studio command line environment.
>>
>> This doesn't work unfortunately; it still finds GNU 4.8.3 compiler somehow.
>
>For some reason Strawberry Perl installed gcc/g++ to my PATH. I
>removed this and it's finding MSVC 19 now. Thanks.
>-- 
>
>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
-- 

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

Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Ah, okay, thanks.  From cmake-gui the solution equivalent would be
selecting the Ninja generator but specifying native compilers (cl.exe
for this example) instead of using the default native compilers?
-- 

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


Re: [CMake] How to generate for Ninja + MSVC?

2015-12-02 Thread iosif neitzke
Isn't this what Generator Toolset selection is for?

ex. cmake -G Ninja -T v140

http://cmake.blogspot.com/2013/05/cmake-2811-available-for-download.html
-- 

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