View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011594 | CMake | CMake | public | 2010-12-10 11:34 | 2011-01-12 07:57 | ||||
Reporter | Petr Petrov | ||||||||
Assigned To | Brad King | ||||||||
Priority | urgent | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | MSVC 2010 | OS | Windows Vista | OS Version | Windows Vista | ||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | CMake 2.8.4 | Fixed in Version | CMake 2.8.4 | ||||||
Summary | 0011594: Incorrect generator for VC2010 | ||||||||
Description | I have created a small Cmake\C++ project which shows this error\issue. It is a simple Cmake project. It contains 1 static C++ library and 1 executable C++ project, which uses the static library. I am specifying to build these two projects into Release configuration. But the static library is being built into DEBUG configuration also! I have tried to reproduce this example for VC2008 generator - and it works fine - only Release version of binaries were created! It causes problem in my big project build! Any ideas? Thank you very much, Petr | ||||||||
Steps To Reproduce | 1) Unpack the attached CMake project; 2) Generate solution and VC2010 project files into xxx\build folder by using VC2010 (32-bit) generator; 3) run "msbuild TestPetrPetrov.sln /m:1 /p:Configuration=Release /p:Platform=Win32" in xxx\build folder from command line 4) see in "xxx\build\Debug\" folder. Here are Lib1.lib and lib1.pdb!!! It is an error! I specified to compile only "RELEASE" configuration, *NOT* debug! 5) see in "xxx\build\Release\" folder. Here are Example1.exe and Lib1.lib. It is correct behavior. P.S. Also I see messages that DEBUG version of Lib1 is being built: Lib: C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\Lib.exe /OUT:"D:\cmake_test3\build\Debug\Lib1.lib" /NOLOGO Lib1. dir\Debug\lib.obj Lib1.vcxproj -> D:\cmake_test3\build\Debug\Lib1.lib | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | cmake_test_petr_petrov.zip [^] (891 bytes) 2010-12-10 11:34 cmake-issue-11594-min.zip [^] (4,880 bytes) 2010-12-10 14:05 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0023882) Brad King (manager) 2010-12-10 14:08 |
Wow, that is really strange. I reproduced it independently from CMake (just msbuild) in the file "cmake-issue-11594-min.zip". A diff between "bug.sln" and "fix.sln" reveals a subtle change. The broken version refers to ".\bug_lib.vcxproj" while the fixed version refers to "bug_lib.vcxproj" I also tested more complicated examples where the library is in a subdirectory. Again, a difference between ".\sub\bug_lib.vcxproj" and "sub\bug_lib.vcxproj" is the difference between broken and working. Clearly this is a subtle msbuild idiosyncrasy that we'll have to work around. |
(0023890) Brad King (manager) 2010-12-10 16:39 |
Fixed: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57e71533 [^] |
(0024284) Brad King (manager) 2010-12-20 11:35 |
Issue 0011633 reports that this fix works for VS 2010 but breaks VS 2008 and below. Building through "devenv" works in both cases so this did not show up in our nightly testing. |
(0024287) Brad King (manager) 2010-12-20 12:43 |
Fixed in a new way that does not trigger issue 0011633: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1442ac9 [^] |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2010-12-10 11:34 | Petr Petrov | New Issue | |
2010-12-10 11:34 | Petr Petrov | File Added: cmake_test_petr_petrov.zip | |
2010-12-10 14:04 | Brad King | Assigned To | => Brad King |
2010-12-10 14:04 | Brad King | Status | new => assigned |
2010-12-10 14:05 | Brad King | File Added: cmake-issue-11594-min.zip | |
2010-12-10 14:08 | Brad King | Note Added: 0023882 | |
2010-12-10 16:39 | Brad King | Note Added: 0023890 | |
2010-12-10 16:39 | Brad King | Status | assigned => closed |
2010-12-10 16:39 | Brad King | Resolution | open => fixed |
2010-12-20 11:13 | Brad King | Relationship added | related to 0011633 |
2010-12-20 11:35 | Brad King | Note Added: 0024284 | |
2010-12-20 11:35 | Brad King | Status | closed => feedback |
2010-12-20 11:35 | Brad King | Resolution | fixed => reopened |
2010-12-20 12:43 | Brad King | Note Added: 0024287 | |
2010-12-20 12:43 | Brad King | Status | feedback => closed |
2010-12-20 12:43 | Brad King | Resolution | reopened => fixed |
2011-01-12 07:57 | David Cole | Fixed in Version | => CMake 2.8.4 |
2011-01-12 07:57 | David Cole | Target Version | => CMake 2.8.4 |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |