View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012504CMakeCMakepublic2011-10-08 06:392012-05-09 15:26
ReporterNiels Dekker 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindowsOSOS Version
Product VersionCMake 2.8.6 
Target VersionCMake 2.8.7Fixed in VersionCMake 2.8.7 
Summary0012504: Fix CMAKE_VERBOSE_MAKEFILE for Visual Studio 10 vcxproj files
DescriptionSwitching 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 ReproducePlace 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 InformationUlzii 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 [^]
TagsNo tags attached.
Attached Filespatch file icon Fix-CMAKE_VERBOSE_MAKEFILE-for-Visual-Studio-10-vcxproj-files.patch [^] (1,384 bytes) 2011-10-11 16:57 [Show Content]

 Relationships

  Notes
(0027560)
Niels Dekker (reporter)
2011-10-08 07:17

CMake mailing list thread on this issue: "[CMake] Shouldn't CMAKE_VERBOSE_MAKEFILE add <SuppressStartupBanner>false</...> to VS 2010 vcxproj files?"
(0027565)
Brad King (manager)
2011-10-11 17:47

http://www.cmake.org/pipermail/cmake/2011-October/046665.html [^]
(0027566)
Brad King (manager)
2011-10-11 17:49

Applied, thanks:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=25116a3c [^]
(0029444)
David Cole (manager)
2012-05-09 15:26

Closing resolved issues that have not been updated in more than 4 months.

 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


Copyright © 2000 - 2018 MantisBT Team