1

I am trying to build with CMake and to pass both options: config: Release and VERBOSE=ON:

cmake --build . --config Release -- VERBOSE=ON

And in CMake of Visual I have the switch:

cmake -G "Visual Studio 14 2015"
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ^

if I pass only '--config Release' it works.

Now it's failing with this message:

15:40:51 MSBUILD : error MSB1008: Only one project can be specified.
15:40:51 Switch: VERBOSE=1
15:40:51 
15:40:51 For switch syntax, type "MSBuild /help"
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Atheel Massalha
  • 424
  • 1
  • 6
  • 18

1 Answers1

1

VERBOSE=ON is not understood by MSBuild.

You probably know that syntax from Unix Makefile generators, where setting eg. the VERBOSE environment variable will give you the verbose output. Note that this is a feature of the generator (ie. make) and not of CMake. Thus when switching to a different generator (in this case MSBuild), you have to find a different way to get the verbose output that works with that generator.

For MSBuild, that would be the /verbosity option. See also this answer for details.

As for the CMAKE_VERBOSE_MAKEFILE option, the manual clearly states that this option only has an effect for Makefile generators (emphasis added by me):

Users may enable the option in their local build tree to get more verbose output from Makefile builds and show each command line as it is launched.

ComicSansMS
  • 51,484
  • 14
  • 155
  • 166
  • as @bbv said in "this answer for details.", this is showing how to see more details of the "msbuild product.sln /t:ALL_BUILD". I am not interested in finding what msbuild is doing in this case. So, the verbosity is required for cmake itself. thanks – Atheel Massalha Dec 06 '17 at 14:17