Skip to content

Commit

Permalink
- document MSBuild verbosity (#1012)
Browse files Browse the repository at this point in the history
* - document MSBuild verbosity

Signed-off-by: SSE4 <tomskside@gmail.com>

* Update cmake.rst

* - forget to check in env_vars.rst

Signed-off-by: SSE4 <tomskside@gmail.com>

* Update conan.conf.rst
  • Loading branch information
SSE4 authored and memsharded committed Jan 16, 2019
1 parent c5dd659 commit 9d105d5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
3 changes: 2 additions & 1 deletion reference/build_helpers/cmake.rst
Expand Up @@ -50,7 +50,7 @@ Constructor
def __init__(self, conanfile, generator=None, cmake_system_name=True,
parallel=True, build_type=None, toolset=None, make_program=None,
set_cmake_flags=False)
set_cmake_flags=False, msbuild_verbosity=None)
Parameters:
- **conanfile** (Required): Conanfile object. Usually ``self`` in a *conanfile.py*
Expand All @@ -63,6 +63,7 @@ Parameters:
- **toolset** (Optional, Defaulted to ``None``): Specify a toolset for Visual Studio.
- **make_program** (Optional, Defaulted to ``None``): Indicate path to ``make``.
- **set_cmake_flags** (Optional, Defaulted to ``None``): Whether or not to set CMake flags like ``CMAKE_CXX_FLAGS``, ``CMAKE_C_FLAGS``, etc.
- **msbuild_verbosity** (Optional, Defaulted to ``None``): verbosity level for MSBuild (in case of Visual Studio generator).

Attributes
----------
Expand Down
6 changes: 4 additions & 2 deletions reference/build_helpers/visual_studio.rst
Expand Up @@ -77,7 +77,8 @@ build()
def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,
parallel=True, force_vcvars=False, toolset=None, platforms=None, use_env=True,
vcvars_ver=None, winsdk_version=None, properties=None, output_binary_log=None)
vcvars_ver=None, winsdk_version=None, properties=None, output_binary_log=None,
property_file_name=None, verbosity=None)
Builds Visual Studio project with the given parameters.

Expand Down Expand Up @@ -119,6 +120,7 @@ Parameters:
`starting from MSBuild version 15.3 and onwards <http://msbuildlog.com/>`_.
- **property_file_name** (Optional, Defaulted to ``None``): When ``None`` it will generate a file named ``conan_build.props``.
You can specify a different name for the generated properties file.
- **verbosity** (Optional, Defaulted to ``None``): Specifies verbosity level (``/verbosity:`` parameter).

.. note::

Expand All @@ -135,7 +137,7 @@ Returns a string command calling :command:`MSBuild`.
def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,
build_type=None, arch=None, parallel=True, toolset=None, platforms=None,
use_env=False, properties=None, output_binary_log=None)
use_env=False, properties=None, output_binary_log=None, verbosity=None)
Parameters:
- **props_file_path** (Optional, Defaulted to ``None``): Path to a property file to be included in the compilation command. This
Expand Down
9 changes: 9 additions & 0 deletions reference/config_files/conan.conf.rst
Expand Up @@ -45,6 +45,8 @@ The typical location of the **conan.conf** file is the directory ``~/.conan/``:
# cmake_find_root_path_mode_library # environment CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
# cmake_find_root_path_mode_include # environment CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
# msbuild_verbosity = minimal # environment CONAN_MSBUILD_VERBOSITY
# cpu_count = 1 # environment CONAN_CPU_COUNT
# Change the default location for building test packages to a temporary folder
Expand Down Expand Up @@ -114,6 +116,13 @@ as it may result in corrupted packages.
The ``cmake_***`` variables will declare the corresponding CMake variable when you use the
:ref:`cmake generator<cmake_generator>` and the :ref:`CMake build tool<cmake_reference>`.

The ``msbuild_verbosity`` variable is used only by :ref:`MSBuild<msbuild>` and :ref:`CMake<cmake_reference>` build helpers.
For the :ref:`CMake<cmake_reference>` build helper, it has an effect only for ```Visual Studio``` generators.
Variable defines verbosity level used by the ```msbuild``` tool, as documented on `MSDN <https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2017>`.
By default, ```minimal`` verbosity level is used, matching the Visual Studio IDE behavior.
Allowed values are (in ascending order): ```quiet```, ```minimal```, ```normal```, ```detailed```, ```diagnostic```.
You can also adjust the environment variable ``CONAN_MSBUILD_VERBOSITY``.

The ``cpu_count`` variable set the number of cores that the :ref:`tools.cpu_count()<cpu_count>` will return,
by default the number of cores available in your machine.
Conan recipes can use the cpu_count() tool to build the library using more than one core.
Expand Down
12 changes: 12 additions & 0 deletions reference/env_vars.rst
Expand Up @@ -240,6 +240,18 @@ For example:
CONAN_MAKE_PROGRAM="mingw32-make"
CONAN_MSBUILD_VERBOSITY
-----------------------

**Defaulted to**: Not defined

Specify ```MSBuild``` verbosity level to use with:

- The build helper :ref:`CMake<cmake_reference>`.
- The build helper :ref:`MSBuild<msbuild>`.

For list of allowed values and their meaning, check out the `MSBuild documentation <https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2017l>`_.

CONAN_PASSWORD, CONAN_PASSWORD_{REMOTE_NAME}
--------------------------------------------

Expand Down

0 comments on commit 9d105d5

Please sign in to comment.