MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0012504 | CMake | CMake | public | 2011-10-08 06:39 | 2012-05-09 15:26 |
Reporter | Niels Dekker | ||||
Assigned To | Brad King | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | OS Version | ||
Product Version | CMake 2.8.6 | ||||
Target Version | CMake 2.8.7 | Fixed in Version | CMake 2.8.7 | ||
Summary | 0012504: Fix CMAKE_VERBOSE_MAKEFILE for Visual Studio 10 vcxproj files | ||||
Description | Switching on CMAKE_VERBOSE_MAKEFILE does not have any effect, when generating Visual Studio 10 vcxproj files. I tested both CMake 2.8.6 and the git/master branch version. If I understand correctly, CMake ignores this variable for VS10, in order to avoid a Visual C++ compiler warning, "D9035: option 'nologo-' has been deprecated". Such a compiler warning occurs when the VS10 attribute SuppressStartupBanner is set to "FALSE". However, the warning does not occur when SuppressStartupBanner is set to "" (empty string)! The following XML should be added to vcxproj files, between the <ClCompile> and </ClCompile> tag, when CMAKE_VERBOSE_MAKEFILE is on: <SuppressStartupBanner></SuppressStartupBanner> I would suggest the following fix, in cmVisualStudioGeneratorOptions::SetVerboseMakefile (cmVisualStudioGeneratorOptions.cxx): Replace: if(verbose && this->Version != 10 && this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) { this->FlagMap["SuppressStartupBanner"] = "FALSE"; } By: if(verbose && this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) { this->FlagMap["SuppressStartupBanner"] = this->Version < 10 ? "FALSE" : ""; } | ||||
Steps To Reproduce | Place the following CMakeLists.txt in a directory that contains "sourcefile.cpp", and generate, using Visual Studio 10 as generator. ------------------------------------------------------------------ project(TestVerboseMakefile) cmake_minimum_required(VERSION 2.8) set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "No /nologo please" FORCE) add_executable(TestVerboseMakefile sourcefile.cpp) ------------------------------------------------------------------ Open the generated Visual Studio Solution File ("TestVerboseMakefile.sln") in Visual Studio 10. Within VS10, open the TestVerboseMakefile Property Pages, select Configuration Properties, C/C++. Check the field for Suppress Startup Banner. It should not say "Yes (/nologo)", but it should not say "No (/nologo-)" either. Instead, it should just be empty! | ||||
Additional Information | Ulzii Luvsanbat (Windows C++ Team) suggested me to make the field for "Supress Startup Banner" empty, in order to get verbose compilations without warnings about 'nologo-': https://connect.microsoft.com/VisualStudio/feedback/details/680839 [^] | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | Fix-CMAKE_VERBOSE_MAKEFILE-for-Visual-Studio-10-vcxproj-files.patch (1,384) 2011-10-11 16:57 https://public.kitware.com/Bug/file/4082/Fix-CMAKE_VERBOSE_MAKEFILE-for-Visual-Studio-10-vcxproj-files.patch | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2011-10-08 06:39 | Niels Dekker | New Issue | |||
2011-10-08 07:17 | Niels Dekker | Note Added: 0027560 | |||
2011-10-11 16:57 | Niels Dekker | File Added: 0012504-Fix-CMAKE_VERBOSE_MAKEFILE-for-Visual-Studio-10-vcxproj-files.patch | |||
2011-10-11 17:47 | Brad King | Assigned To | => Brad King | ||
2011-10-11 17:47 | Brad King | Status | new => assigned | ||
2011-10-11 17:47 | Brad King | Note Added: 0027565 | |||
2011-10-11 17:49 | Brad King | Note Added: 0027566 | |||
2011-10-11 17:49 | Brad King | Status | assigned => resolved | ||
2011-10-11 17:49 | Brad King | Resolution | open => fixed | ||
2011-12-16 17:20 | David Cole | Fixed in Version | => CMake 2.8.7 | ||
2011-12-16 17:20 | David Cole | Target Version | => CMake 2.8.7 | ||
2012-05-09 15:26 | David Cole | Note Added: 0029444 | |||
2012-05-09 15:26 | David Cole | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|