[CMake] can't generate WindowsPhone 8.1 projects

Gilles Khouzam Gilles.Khouzam at microsoft.com
Tue Mar 15 19:56:31 EDT 2016


If you only have VS2015, then this behavior is normal. When you install the Windows Phone 8.1 SDK, it will have the VS 2013 toolset for those projects, but not the full compiler toolset.

So is this currently working? Are you having trouble on one particular machine?

Thanks
~Gilles

From: Aaron Simmons [mailto:asimmons at sensoryinc.com]
Sent: Tuesday, March 15, 2016 16:50
To: Gilles Khouzam <Gilles.Khouzam at microsoft.com>
Cc: cmake at cmake.org
Subject: Re: [CMake] can't generate WindowsPhone 8.1 projects

I'm using CMake 3.5.0 on Windows 10.  To simplify things, I started from a fresh Windows 10 image and installed Visual Studio 2015.

When I try your suggestion to use the 2013 generator, I get
    cmake .. -G "Visual Studio 12 2013 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1
    CMake Error at CMakeLists.txt:2 (project):
      A Windows Phone component with CMake requires both the Windows Desktop SDK
      as well as the Windows Phone '8.1' SDK.  Please make sure that you have
      both installed

When I try it with the 2015 generator, I get
    cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1
    -- The C compiler identification is MSVC 18.0.31010.0
    -- The CXX compiler identification is MSVC 18.0.31010.0
    -- Check for working C compiler using: Visual Studio 14 2015 ARM
    -- Check for working C compiler using: Visual Studio 14 2015 ARM -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler using: Visual Studio 14 2015 ARM
    -- Check for working CXX compiler using: Visual Studio 14 2015 ARM -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    CMAKE_C_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe
    CMAKE_CXX_COMPILER C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_arm/cl.exe
    -- Configuring done
    -- Generating done


How odd-- it can't generate with 2013, but when it generates with 2015 it uses the 2013 compiler.



Aaron Simmons
Application Software Engineer at Sensory, Inc

On Mon, Mar 14, 2016 at 2:40 PM, Gilles Khouzam <Gilles.Khouzam at microsoft.com<mailto:Gilles.Khouzam at microsoft.com>> wrote:
Hi Aaron

What happens if you sent the compiler to Visual Studio 12 2013 ARM?

I’ll try this on my side and see if I can repro.

Which version of CMake are you running?

Thanks
~Gilles

From: CMake [mailto:cmake-bounces at cmake.org<mailto:cmake-bounces at cmake.org>] On Behalf Of Aaron Simmons via CMake
Sent: Monday, March 14, 2016 10:34
To: cmake at cmake.org<mailto:cmake at cmake.org>
Subject: Re: [CMake] can't generate WindowsPhone 8.1 projects

I looked at the CMAKE_C_COMPILER for WindowsStore/10.0, and its printing
   C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_arm/cl.exe
which is correct!

So I think the problem is that for WindowsPhone CMake is looking up the Visual Studio version incorrectly.


Aaron Simmons
Application Software Engineer at Sensory, Inc

On Mon, Mar 14, 2016 at 11:30 AM, Aaron Simmons <asimmons at sensoryinc.com<mailto:asimmons at sensoryinc.com>> wrote:
In the successful case, I printed out CMAKE_C_COMPILER and found that its pointing to
   C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/WPSDK/WP80/bin/x86_arm/cl.exe
even though I'm using the generator for "Visual Studio 14 2015 ARM".

I think its not working because there isn't a WindowsPhone/8.1 compiler in that old Visual Studio.  (I'm unsure as to why WindowsStore/10.0 works.)

I have Visual Studio 11, 12, and 14 on my system.  How can I tell CMake to use the right one?


Aaron Simmons
Application Software Engineer at Sensory, Inc

On Mon, Mar 14, 2016 at 11:11 AM, Aaron Simmons <asimmons at sensoryinc.com<mailto:asimmons at sensoryinc.com>> wrote:
With this CMakeLists.txt:
       cmake_minimum_required(VERSION 3.5.0)
       project(TestLib)
and this command:
       cmake .. -G "Visual Studio 14 2015 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1
I get this output:
       -- The C compiler identification is unknown
       -- The CXX compiler identification is unknown
       CMake Error at CMakeLists.txt:2 (project):
         No CMAKE_C_COMPILER could be found.

       CMake Error at CMakeLists.txt:2 (project):
         No CMAKE_CXX_COMPILER could be found.

Oddly, using WindowsPhone/8.0 or WindowsStore/10.0 works.  I'm not sure how to debug this problem.  Any pointers?



Thanks,
aaron



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160315/8289bb5e/attachment-0001.html>


More information about the CMake mailing list