[cmake-developers] [PATCH] Option CMAKE_INSTALL_COMPONENTS and IFW installer

Brad King brad.king at kitware.com
Mon Jul 6 14:00:55 EDT 2015


On 07/03/2015 09:09 AM, Konstantin Podsvirov wrote:
> About 6 months ago I started a topic cmake-install-components.
> Today I am ready to share the results.

Great, thanks!  The changes look good except for comments below.

> So as not to disturb those who do not need it I have added the
> option CMAKE_INSTALL_COMPONENTS, which by default is set to OFF.

Please rename this to "CMake_INSTALL_COMPONENTS".  We've started
a convention of using "CMake_" for options affecting the build
of CMake itself and "CMAKE_" for general CMake-defined options
that could be used by any project.

In this hunk:

> -install(TARGETS cmake ctest cpack DESTINATION bin)
> +# Install tools
> +
> +set(_tools cmake ctest cpack)
> +
>  if(APPLE)
> -  install(TARGETS cmakexbuild DESTINATION bin)
> +  list(APPEND _tools cmakexbuild)
>  endif()
>  
> +foreach(_tool ${_tools})
> +  install(TARGETS ${_tool} DESTINATION bin COMPONENT ${_tool})
> +endforeach()

The cmakexbuild tool is an implementation detail of cmake/ctest/cpack
that must be installed along with them.  Whatever enforces that those
three components are required should cover cmakexbuild too.

Thanks,
-Brad



More information about the cmake-developers mailing list