View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014562 | CMake | CMake | public | 2013-11-12 03:33 | 2014-06-02 08:37 | ||||
Reporter | Kiron | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | Windows | OS Version | 6.1 | |||||
Product Version | CMake 2.8.12 | ||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||
Summary | 0014562: not able to compile a simple test program with -G "Visual Studio 11 2012" -Tv90 | ||||||||
Description | CMake 2.8.12 (and 2.8.11) is unable to generate a VS 11 2012 project with toolset v90 and Visual Studio 11 2012 generator. CMake produces the following error: > cmake -H. -Bbuild-vs11Tv90 -G "Visual Studio 11 2012" -Tv90 -- The C compiler identification is MSVC 15.0.30729.1 -- The CXX compiler identification is MSVC 15.0.30729.1 -- Check for working C compiler using: Visual Studio 11 2012 -- Check for working C compiler using: Visual Studio 11 2012 -- broken CMake Error at C:/xxx/cmake/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/cl.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/xxx/build-vs11Tv90/CMakeFiles/CMakeTmp Run Build Command:C:\PROGRA~2\MICROS~3.0\Common7\IDE\devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec3158555336 Microsoft (R) Microsoft Visual Studio 2012 Version 11.0.60610.1. Copyright (C) Microsoft Corp. All rights reserved. The operation could not be completed. Wrong Parameter. Use: devenv [solutionfile | projectfile | anyfile.ext] [switches] The first argument for devenv is usually a solution file or project file. ... BUT it works when using the Visual Studio 10 2010 generator: > cmake -H. -Bbuild-vs10Tv90 -G "Visual Studio 10 2010" -Tv90 -- The C compiler identification is MSVC 15.0.30729.1 -- The CXX compiler identification is MSVC 15.0.30729.1 -- Check for working C compiler using: Visual Studio 10 2010 -- Check for working C compiler using: Visual Studio 10 2010 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 10 2010 -- Check for working CXX compiler using: Visual Studio 10 2010 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: C:/xxx/build-vs10Tv90 | ||||||||
Steps To Reproduce | Run following command with an empty CMakeLists.txt in the current directory: > cmake -H. -Bbuild-vs11Tv90 -G "Visual Studio 11 2012" -Tv90 This fails, but following commands works: > cmake -H. -Bbuild-vs10Tv90 -G "Visual Studio 10 2010" -Tv90 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0034436) Brad King (manager) 2013-11-12 10:08 |
Try adding -DCMAKE_MAKE_PROGRAM=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe to the command-line too. Set the path to wherever you have msbuild. |
(0034441) Kiron (reporter) 2013-11-13 05:04 |
I tried it with setting CMAKE_MAKE_PROGRAM and it worked. Will this be fixed in CMake, so that it works like with VS2010 generator? |
(0034485) Brad King (manager) 2013-11-19 11:33 |
This problem, in aggregate with related problems I've seen in the past, motivated me to finally perform a sweeping overhaul of how CMake selects a tool to launch the generated native build system (commit range e650225d..4cce44b6). The main commit that may relate to this issue is: VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=558c74d0 [^] For VS we now pick the default build tool as late as possible, even after generation of the project is completed. For VS >= 10 we pick MSBuild unless the user sets CMAKE_MAKE_PROGRAM manually or the .sln references Intel Fortran .vfproj files. |
(0034486) Brad King (manager) 2013-11-19 11:44 |
With the changes mentioned in 0014562:0034485 I can now run cmake ../src -G "Visual Studio 11 2012" -Tv90 to use the VS 9 toolset with the VS 11 generator. |
(0036015) Robert Maynard (manager) 2014-06-02 08:37 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-11-12 03:33 | Kiron | New Issue | |
2013-11-12 10:08 | Brad King | Note Added: 0034436 | |
2013-11-13 05:04 | Kiron | Note Added: 0034441 | |
2013-11-19 11:33 | Brad King | Note Added: 0034485 | |
2013-11-19 11:41 | Brad King | Assigned To | => Brad King |
2013-11-19 11:41 | Brad King | Status | new => assigned |
2013-11-19 11:41 | Brad King | Target Version | => CMake 3.0 |
2013-11-19 11:44 | Brad King | Note Added: 0034486 | |
2013-11-19 11:44 | Brad King | Status | assigned => resolved |
2013-11-19 11:44 | Brad King | Resolution | open => fixed |
2013-11-19 11:44 | Brad King | Fixed in Version | => CMake 3.0 |
2014-06-02 08:37 | Robert Maynard | Note Added: 0036015 | |
2014-06-02 08:37 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |