The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=12504 ====================================================================== Reported By: Niels Dekker Assigned To: ====================================================================== Project: CMake Issue ID: 12504 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2011-10-08 12:39 WAST Last Modified: 2011-10-08 12:39 WAST ====================================================================== Summary: 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 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-10-08 12:39 Niels Dekker New Issue ====================================================================== -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers