| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0015640 | CMake | CMake | public | 2015-07-07 11:04 | 2016-01-04 11:52 | ||||
| Reporter | James Johnston | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | major | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | Visual C++ 2008 Express | OS | Windows 7 64-bit | OS Version | Windows 7 SP1 | ||||
| Product Version | CMake 3.2.3 | ||||||||
| Target Version | CMake 3.4 | Fixed in Version | CMake 3.4 | ||||||
| Summary | 0015640: CMake converts generator from Visual Studio 9 2008 to Visual Studio 10 2010 if ZERO_CHECK fails | ||||||||
| Description | When using CMake with the Visual Studio 9 2008 generator, if the ZERO_CHECK "project" fails (e.g. due to a FATAL_ERROR or whatever in the CMakeLists.txt file), the entire CMake project is converted to Visual Studio 10 2010! Since the build tree is now in who-knows-what corrupted state, I have no choice but to delete the whole build tree and start over. It's quite time-consuming. The issue doesn't seem to be easily reproduced outside of the ZERO_CHECK project - e.g. I couldn't figure out how to reproduce it with cmake-gui.exe or cmake.exe. | ||||||||
| Steps To Reproduce | 1. Make a new source tree with the following CMakeLists.txt file: cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) project(TestProject) #message(FATAL_ERROR "Error") 2. Create empty build tree directory as normal, cd to it, and run: cmake "-GVisual Studio 9 2008" <path to source tree> 3. Open the generated Visual Studio solution in Visual C++ 2008. (I used Express version). 4. Edit the CMakeLists.txt and remove the comment on "message" so that the CMake configure will fail now. 5. Build the ZERO_CHECK project; note that it fails as expected. 6. Remark out the "message" from CMakeLists.txt so that CMake once again will configure ok. 7. Build the ZERO_CHECK project again. This time, ZERO_CHECK will convert everything over to Visual Studio 2010: * The CMake output shown in Visual Studio "Output" pane says "Building for Visual Studio 10 2010". * The CMakeCache.txt holds: CMAKE_GENERATOR:INTERNAL=Visual Studio 10 2010 * Visual Studio 2008 refuses to reload the solution ("created by a newer version of this application and cannot be opened") * Examination of the build tree shows a VS2010 solution and VCPROJ/VCXPROJ files side-by-side... | ||||||||
| Additional Information | The problem has been successfully reproduced with both CMake 3.3.0-rc1 and the nightly cmake-3.3.20150706-g32b76-win32-x86 build. | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0039028) Brad King (manager) 2015-07-07 14:22 |
Thanks. This should fix it: cmake: Preserve cached CMAKE_GENERATOR when an error occurs http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b60232e [^] |
|
(0039094) James Johnston (developer) 2015-07-08 11:39 |
Retested with cmake-3.3.20150707-g6e60f-win32-x86 and the problem did not recur. |
|
(0039263) Andrew Regier (reporter) 2015-08-10 16:19 |
Will this fix be included in 3.4, or will there be an updated 3.3 release that includes it? I have seen this bug as well. |
|
(0039266) Brad King (manager) 2015-08-11 09:20 |
Re 0015640:0039263: This will first be released in 3.4. |
|
(0040111) Robert Maynard (manager) 2016-01-04 11:52 |
Closing resolved issues that have not been updated in more than 4 months. |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2015-07-07 11:04 | James Johnston | New Issue | |
| 2015-07-07 14:22 | Brad King | Note Added: 0039028 | |
| 2015-07-07 14:22 | Brad King | Assigned To | => Brad King |
| 2015-07-07 14:22 | Brad King | Status | new => resolved |
| 2015-07-07 14:22 | Brad King | Resolution | open => fixed |
| 2015-07-07 14:22 | Brad King | Fixed in Version | => CMake 3.4 |
| 2015-07-07 14:22 | Brad King | Target Version | => CMake 3.4 |
| 2015-07-08 11:39 | James Johnston | Note Added: 0039094 | |
| 2015-08-10 16:19 | Andrew Regier | Note Added: 0039263 | |
| 2015-08-11 09:20 | Brad King | Note Added: 0039266 | |
| 2016-01-04 11:52 | Robert Maynard | Note Added: 0040111 | |
| 2016-01-04 11:52 | Robert Maynard | Status | resolved => closed |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |