Re: [CMake] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build

2016-03-15 Thread Sergei Nikulov
2016-03-14 17:44 GMT+03:00 Barry Scott :
> Windows 10 with Cmake 3.4.3 or 3.5.0.
> I have the following Visual C versions installed.
>
> Microsoft Visual Studio 14.0
> Microsoft Visual Studio 12.0
> Microsoft Visual Studio 11.0
> Visual C++ for Python
>

  ...snip...

> Why is CMAKE trying to use anything from VC 2010?
>
> Can I work around this bug?

Just checked with following steps

1. Opened command window (cmd.exe)
2. Clone libssh2 from GitHub (git clone https://github.com/libssh2/libssh2.git)
3. Change dir to libssh2 (cd libssh2)
4. Create folder build (mkdir build)
5. Change dir to build (cd build)
6. Generate build for MSVS 2015 (cmake .. -G"Visual Studio 14 Win64")
7. Build it (cmake --build . --config Release)

And see no any problems :(

Could you please be more specific?
For example provide generator log for your "bug".

Thank you.


> Removing VC 2010 is reasonable workaround.
>
> Barry
> --
>
> 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



-- 
Best Regards,
Sergei Nikulov
-- 

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] Cmake fails to build libssh2 - wants VC 2010 told for VC 2015 build

2016-03-15 Thread Barry Scott
On Tue, 15 Mar 2016 10:37:04 +0300
Sergei Nikulov  wrote:

> Just checked with following steps
> 
> 1. Opened command window (cmd.exe)
> 2. Clone libssh2 from GitHub (git clone 
> https://github.com/libssh2/libssh2.git)

Out of curiosity why did you ignore my steps using the tar ball and use
the git clone?

> 3. Change dir to libssh2 (cd libssh2)
> 4. Create folder build (mkdir build)
> 5. Change dir to build (cd build)
> 6. Generate build for MSVS 2015 (cmake .. -G"Visual Studio 14 Win64")
> 7. Build it (cmake --build . --config Release)
> 
> And see no any problems :(

I also see no problem with the git clone.

> Could you please be more specific?
> For example provide generator log for your "bug".

The conclusion I draw is that libssh2 has fixed a "bug" with its cmake
config files.

Thanks for looking at this.

Barry
-- 

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] Clarifying Cmake behavior

2016-03-15 Thread James Benze
Hey all:

I'm trying to compile boost with some weird options, and I can't get
projects linked with it to compile correctly.  As using regularly compiled
boost seems to work just fine, this indicates my issue is not with
cmake...however I was hoping I could get some clarification on how cmake
searches for things in order to diagnose my issue.

I made a toy project here:

cmake_minimum_required(VERSION 2.8.4)
project(testproject)

find_package(Boost 1.58.0 REQUIRED COMPONENTS thread)
add_executable(a.out main.cpp)
target_link_libraries(a.out ${Boost_LIBRARIES})

When I build this project with the "good" normally compiled boost
libraries, I get this CMakeFiles/a.out.dir/link.txt:

/full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out
-rdynamic /full/path/to/good/boost/libboost_thread.so
-Wl,-rpath,/full/path/to/good/boost

When I build the project with the exact same options, except substituting
the "bad" boost for the BOOST_ROOT variable, I get:

/full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out
-rdynamic -lboost_thread

The obvious differences here are that with the good boost libraries, we get
a full path to the boost library and not a shortened path.  Additionally,
with the good library, I get a the rpath to the library set as well.  The
${Boost_LIBRARIES} variable is the full path to libboost_thread.so in both
cases.

This is obviously a problem with my boost compilation, but this is my only
clue to diagnosing the problem.  I was hoping for some insight as to why
cmake would choose one way of linking over another so I could attempt to
fix my actual problem.

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] Clarifying Cmake behavior

2016-03-15 Thread James Benze
So I combed through the source code, and solved the problem, mostly.  It
did turn out to be a cmake issue, sort of, so I figured I'd post here for
posterity in case future problem solvers come across a similar issue.

So I'm using both a custom compiler and a custom set of boost libraries.
For simplicity, I installed them to the same prefix
(/path/to/custom/stuff).  Now cmake has a list of libraries that it thinks
are always looked in for link directories.  If you use a custom compiler
(/path/to/custom/stuff/bin/g++ for example), it adds that compiler's
libraries to it's "implicit link directories", ones that it assumes are
found automatically (in this case /path/to/custom/stuff/lib and
/path/to/custom/stuff/lib64).  Because my custom boost version was in this
library path (/path/to/custom/stuff/lib) cmake assumed that the compiler
could find them and just used the "-l" syntax with no RPATH set.  When I
used my control set of libraries, they were installed in a different prefix
(/path/to/test/boost/) so cmake says "oh you can't find these" and did the
full path linkage plus RPATH.

So my two solutions are as follows:

1) set LD_LIBRARY_PATH when building. In this case, everything links
correctly, although ld harmlessly complains about conflicts with the
distribution-installed libraries in /usr/lib/
2) Install boost in a different directory than my custom compiler.

Cheers, all.

On Tue, Mar 15, 2016 at 10:38 AM, James Benze  wrote:

> Hey all:
>
> I'm trying to compile boost with some weird options, and I can't get
> projects linked with it to compile correctly.  As using regularly compiled
> boost seems to work just fine, this indicates my issue is not with
> cmake...however I was hoping I could get some clarification on how cmake
> searches for things in order to diagnose my issue.
>
> I made a toy project here:
>
> cmake_minimum_required(VERSION 2.8.4)
> project(testproject)
>
> find_package(Boost 1.58.0 REQUIRED COMPONENTS thread)
> add_executable(a.out main.cpp)
> target_link_libraries(a.out ${Boost_LIBRARIES})
>
> When I build this project with the "good" normally compiled boost
> libraries, I get this CMakeFiles/a.out.dir/link.txt:
>
> /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out
> -rdynamic /full/path/to/good/boost/libboost_thread.so
> -Wl,-rpath,/full/path/to/good/boost
>
> When I build the project with the exact same options, except substituting
> the "bad" boost for the BOOST_ROOT variable, I get:
>
> /full/path/to/compiler/g++ CMakeFiles/a.out.dir/main.cpp.o -o a.out
> -rdynamic -lboost_thread
>
> The obvious differences here are that with the good boost libraries, we
> get a full path to the boost library and not a shortened path.
> Additionally, with the good library, I get a the rpath to the library set
> as well.  The ${Boost_LIBRARIES} variable is the full path to
> libboost_thread.so in both cases.
>
> This is obviously a problem with my boost compilation, but this is my only
> clue to diagnosing the problem.  I was hoping for some insight as to why
> cmake would choose one way of linking over another so I could attempt to
> fix my actual problem.
>
> 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] can't generate WindowsPhone 8.1 projects

2016-03-15 Thread Aaron Simmons via CMake
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.khou...@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-boun...@cmake.org] *On Behalf Of *Aaron
> Simmons via CMake
> *Sent:* Monday, March 14, 2016 10:34
> *To:* cmake@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 
> 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 
> 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
>
>
>
>
>
-- 

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] can't generate WindowsPhone 8.1 projects

2016-03-15 Thread Aaron Simmons via CMake
I think my problem was that I had a dev machine that had upgraded through
several Visual Studio versions.  Now that I'm using a fresh-install of
Visual Studio 2015, its working.  The use of the old compiler was
confusing, but if that's expected then that's ok.

Aaron Simmons
Application Software Engineer at Sensory, Inc


On Tue, Mar 15, 2016 at 5:56 PM, Gilles Khouzam <
gilles.khou...@microsoft.com> wrote:

> 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:asimm...@sensoryinc.com]
> *Sent:* Tuesday, March 15, 2016 16:50
> *To:* Gilles Khouzam 
> *Cc:* cmake@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.khou...@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-boun...@cmake.org] *On Behalf Of *Aaron
> Simmons via CMake
> *Sent:* Monday, March 14, 2016 10:34
> *To:* cmake@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 
> 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 
> 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 CMa

Re: [CMake] can't generate WindowsPhone 8.1 projects

2016-03-15 Thread Gilles Khouzam
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:asimm...@sensoryinc.com]
Sent: Tuesday, March 15, 2016 16:50
To: Gilles Khouzam 
Cc: cmake@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 
mailto:gilles.khou...@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-boun...@cmake.org] On 
Behalf Of Aaron Simmons via CMake
Sent: Monday, March 14, 2016 10:34
To: cmake@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 
mailto:asimm...@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 
mailto:asimm...@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



-- 

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.k