MantisBT - CMake |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0015986 | CMake | CMake | public | 2016-02-24 11:24 | 2016-06-10 14:21 |
|
Reporter | Gregor Jasny | |
Assigned To | Brad King | |
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | CMake 3.5 | |
Target Version | CMake 3.5 | Fixed in Version | CMake 3.5 | |
|
Summary | 0015986: Visual Studio 2015 does not work with v120 toolset |
Description | Hello,
today I tried to use Visual Studio 2015 to build with the VS2013 (v120) toolset.
Unfortunately I get the following error:
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 14 2015
-- Check for working C compiler using: Visual Studio 14 2015 -- broken
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/cl.exe" is not able to compile a simple test program.
It properly works in the "same" toolchain pairing:
-G "Visual Studio 12 2013" -T v120
-G "Visual Studio 14 2015" -T v140
Thanks,
Gregor |
Steps To Reproduce | CMakeLists.txt containing just:
project(VS2015Test C CXX)
Configure:
"c:\Program Files (x86)\CMake\bin\cmake.exe" -G "Visual Studio 14 2015" -T v120 ..
|
Additional Information | C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(639,9): error MSB4030: "Debug" is an invalid value for the "GenerateDebugInformation" parameter of the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean". [C:\Users\gregorj\devtrees\vs2015test\_build\CMakeFiles\CMakeTmp\cmTC_05d1a.vcxproj] |
Tags | No tags attached. |
Relationships | related to | 0015894 | closed | Brad King | Visual C++ 2015 Generator wrong output for debug information |
|
Attached Files | CMakeError.log (3,141) 2016-02-24 11:24 https://public.kitware.com/Bug/file/5632/CMakeError.log |
|
Issue History |
Date Modified | Username | Field | Change |
2016-02-24 11:24 | Gregor Jasny | New Issue | |
2016-02-24 11:24 | Gregor Jasny | File Added: CMakeError.log | |
2016-02-24 11:30 | Gregor Jasny | Relationship added | related to 0015894 |
2016-02-24 11:35 | Brad King | Note Added: 0040533 | |
2016-02-24 11:36 | Brad King | Target Version | => CMake 3.5 |
2016-02-24 12:36 | Brad King | Note Added: 0040534 | |
2016-02-24 12:49 | Brad King | Note Added: 0040535 | |
2016-02-24 12:49 | Brad King | Assigned To | => Brad King |
2016-02-24 12:49 | Brad King | Status | new => resolved |
2016-02-24 12:49 | Brad King | Resolution | open => fixed |
2016-02-24 12:49 | Brad King | Fixed in Version | => CMake 3.5 |
2016-02-25 03:34 | Gregor Jasny | Note Added: 0040545 | |
2016-02-25 04:37 | Gregor Jasny | Note Added: 0040547 | |
2016-02-25 08:52 | Brad King | Note Added: 0040548 | |
2016-03-04 10:50 | Paulw | Note Added: 0040597 | |
2016-03-07 10:33 | Brad King | Note Added: 0040635 | |
2016-03-08 08:42 | Brad King | Note Added: 0040647 | |
2016-06-10 14:21 | Kitware Robot | Note Added: 0041232 | |
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes |
|
(0040533)
|
Brad King
|
2016-02-24 11:35
|
|
Yes, the change linked in 0015894:0040163:
VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f086c665 [^]
appears to be responsible for this. It seems that the proper choice depends on the toolset rather than the version of VS. Unfortunately this may mean we now have to memorize information about each toolset value. |
|
|
(0040534)
|
Brad King
|
2016-02-24 12:36
|
|
|
|
(0040535)
|
Brad King
|
2016-02-24 12:49
|
|
|
|
(0040545)
|
Gregor Jasny
|
2016-02-25 03:34
|
|
Seems the nightly Windows build fails since February 22nd. |
|
|
(0040547)
|
Gregor Jasny
|
2016-02-25 04:37
|
|
The fix seems to work properly:
C:\Users\gregorj\devtrees\vs2015test\_bp>c:\Users\gregorj\devtrees\cmake\_build\bin\Debug\cmake.exe
-G "Visual Studio 14 2015" -T v120 ..
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 14 2015
-- Check for working C compiler using: Visual Studio 14 2015 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015
-- Check for working CXX compiler using: Visual Studio 14 2015 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- C compiler C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- C++ compiler C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/gregorj/devtrees/vs2015test/_bp
But I find the "Check for working C compiler using: Visual Studio 14 2015" line confusing. Maybe you could add the used toolset in brackets behind. |
|
|
(0040548)
|
Brad King
|
2016-02-25 08:52
|
|
Re 0015986:0040547: Great, thanks for testing.
> But I find the "Check for working C compiler using: Visual Studio 14 2015" line confusing. Maybe you could add the used toolset in brackets behind.
That is historical behavior left from when we didn't detect the full path to the compiler on VS generators and VS only had one compiler per version. Updated:
Improve compiler check message on non-Make generators
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f3ac0651 [^] |
|
|
(0040597)
|
Paulw
|
2016-03-04 10:50
|
|
Same issue with the vs 2010 (v100) toolset. Can you please add it you your hack (I saw only v110 and v120 in your code). Also, note that Microsoft has the same problem so it may be worth talking to them. If I have a solution compiled in 2015 and I switch the toolset to 2010 using the VS GUI, it puts an invalid value in the linker DEBUG option, so build fails with exactly the same notification as when CMAKE tries to build with 2010. Maybe the final fix should reside in Visual Studio?? |
|
|
(0040635)
|
Brad King
|
2016-03-07 10:33
|
|
|
|
(0040647)
|
Brad King
|
2016-03-08 08:42
|
|
|
|
(0041232)
|
Kitware Robot
|
2016-06-10 14:21
|
|
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|