View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015228CMakeCMakepublic2014-10-29 17:322015-05-04 09:05
ReporterRemi 
Assigned ToGilles Khouzam 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSWindowsOS VersionWindows 8.1
Product VersionCMake 3.1 
Target VersionCMake 3.1Fixed in VersionCMake 3.1 
Summary0015228: Compiler identification fails with -DCMAKE_SYSTEM_NAME=WindowsStore
Descriptioncmake version 3.1.0-rc1

I tried to generate a project with the command line below:

cmake -G "Visual Studio 12 2013" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.0

and it fails with:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
  No CMAKE_C_COMPILER could be found.



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



-- Configuring incomplete, errors occurred!
See also "[censored]/CMakeFiles/CMakeOutput.log".
See also "[censored]/CMakeFiles/CMakeError.log".

I checked the files to understand the error.

 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2012 (Platform Toolset = 'v110') cannot be found. To build using the v110 build tools, please install Visual Studio 2012 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...".

I believe the error is that 'v110' in the project file should be 'v120'.
Steps To Reproducecmake -G "Visual Studio 12 2013" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.0

Installed on my machine:
 VS Express 2013 for Desktop
 VS Express 2013 for Windows
TagsVisual Studio 2013
Attached Filespatch file icon 15228.patch [^] (17,067 bytes) 2014-11-13 15:01 [Show Content]
patch file icon 15228-2.patch [^] (1,405 bytes) 2014-11-13 15:58 [Show Content]
bz2 file icon cmake_obj_lib.tar.bz2 [^] (521 bytes) 2014-11-15 04:50
patch file icon 15228-3.patch [^] (1,027 bytes) 2014-11-16 17:32 [Show Content]

 Relationships

  Notes
(0037106)
Remi (reporter)
2014-10-29 19:00

I now understand that I should use -DCMAKE_SYSTEM_VERSION=8.1 with Visual Studio 12, and -DCMAKE_SYSTEM_VERSION=8.0 does not work. Still I'd expect cmake to fail with an error message that is easier to understand.

Also, it seems that OBJECT libraries don't work. For every OBJECT library, I get an error message: error MSB3030: Could not copy the file [...].winmd because it was not found. I will investigate tomorrow. Maybe I should open another report for that problem.

In addition, the ALL_BUILD and ZERO_CHECK projects are marked as incompatible.
(0037209)
Gilles Khouzam (developer)
2014-11-13 15:04

I've attached the patch to help with this issue. CMake requires both the Desktop SDK and the platform SDK that you are targeting and this patch will try to make sure that the right SDKs are installed.

If you're missing an SDK, you will get an error message like the following one.

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

For the issue with the ALL_BUILD and ZERO_CHECK projects, the express editions can only target the projects that they are designed for (even if you have multiple of them installed). This is unfortunate and hopefully with the recent announcement that the new VS 2013 Free edition will be able to target all platforms this hopefully will make things easier.
(0037210)
Brad King (manager)
2014-11-13 15:27

Re 0015228:0037209: Thanks. I've applied the patch and merged for testing:

 VS: Improve error messages when compiler is not detected
 http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f601591 [^]
(0037212)
Gilles Khouzam (developer)
2014-11-13 15:58

Missed a detection case on VS2013.

Attached patch 2.

Now all tests pass.
(0037214)
Brad King (manager)
2014-11-13 16:04

Re 0015228:0037212: Thanks, I squashed that in:

 VS: Improve error messages when compiler is not detected
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e8d1f0c6 [^]
(0037224)
Brad King (manager)
2014-11-14 15:00

Does having both the Desktop SDK and Platform SDK also solve the problem with OBJECT libraries reported in 0015228:0037106?
(0037226)
Gilles Khouzam (developer)
2014-11-14 19:34

The object libraries issue is most likely similar to something I saw with static libraries that would default to adding a WinMD file.

I'll try to get a repro unless Remi can provide one.
(0037227)
Remi (reporter)
2014-11-15 04:55

Thanks for your efforts to fix this problem. I attached a minimal project that illustrates the problem with an object library. Visual Studio Express for Windows fails to compile the project generated by:
cmake -G "Visual Studio 12 2013" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.1
with the MSB3030 error regarding a .winmd file. I did not apply any patch: this is with 3.1.0-rc1.
(0037228)
Gilles Khouzam (developer)
2014-11-16 17:32

Thanks Remi.

This is indeed what I thought it was. I've got a patch, for the object library issue. Since for Windows a object library is the same as a static library, we had a special clause to not produce windows metadata on static libraries, I added the same thing for object libraries.

Remi, you could change to a static library until the fix makes it through.
(0037229)
Brad King (manager)
2014-11-17 08:59

Re 0015228:0037228: Thanks. Patch applied here:

 VS: Do not produce WinMD file for OBJECT libraries
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=689cd0d4 [^]
(0037338)
Brad King (manager)
2014-12-01 14:29

Both fixes here have been merged to the 'release' branch in preparation for the next 3.1 release candidate.
(0038684)
Robert Maynard (manager)
2015-05-04 09:05

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-10-29 17:32 Remi New Issue
2014-10-29 17:33 Remi Tag Attached: Visual Studio 2013
2014-10-29 19:00 Remi Note Added: 0037106
2014-10-30 08:34 Brad King Assigned To => Gilles Khouzam
2014-10-30 08:34 Brad King Status new => assigned
2014-10-30 08:35 Brad King Product Version => CMake 3.1
2014-10-30 08:35 Brad King Target Version => CMake 3.2
2014-11-13 15:01 Gilles Khouzam File Added: 15228.patch
2014-11-13 15:04 Gilles Khouzam Note Added: 0037209
2014-11-13 15:27 Brad King Note Added: 0037210
2014-11-13 15:58 Gilles Khouzam File Added: 15228-2.patch
2014-11-13 15:58 Gilles Khouzam Note Added: 0037212
2014-11-13 16:04 Brad King Note Added: 0037214
2014-11-14 15:00 Brad King Note Added: 0037224
2014-11-14 19:34 Gilles Khouzam Note Added: 0037226
2014-11-15 04:50 Remi File Added: cmake_obj_lib.tar.bz2
2014-11-15 04:55 Remi Note Added: 0037227
2014-11-16 17:32 Gilles Khouzam Note Added: 0037228
2014-11-16 17:32 Gilles Khouzam File Added: 15228-3.patch
2014-11-17 08:59 Brad King Note Added: 0037229
2014-12-01 14:29 Brad King Note Added: 0037338
2014-12-01 14:29 Brad King Status assigned => resolved
2014-12-01 14:29 Brad King Resolution open => fixed
2014-12-01 14:29 Brad King Fixed in Version => CMake 3.1
2014-12-01 14:29 Brad King Target Version CMake 3.2 => CMake 3.1
2015-05-04 09:05 Robert Maynard Note Added: 0038684
2015-05-04 09:05 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team