[CMake] installing without building the whole project

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jun 13 04:57:55 EDT 2011


On Thursday 09 June 2011, Michael Hertling wrote:
> On 06/09/2011 03:34 PM, Dominik Szczerba wrote:
> > Hi,
> > 
> > I have a big project with several subfolders. In one subfolder's cmake
> > file I have e.g.
> > 
> > INSTALL(TARGETS test DESTINATION ${CMAKE_INSTALL_PREFIX} CONFIGURATIONS
> > RELEASE)
> > 
> > Now when I call "make install" on linux or build "INSTALL" project in
> > MSVC the whole project is built prior to installation of "test". How
> > would I force to only build "test" in this case?
> > 
> > Many thanks for any hints,
> > Dominik
> 
> Since the general "install" target always depends on the general "all"
> target, 


This dependency can be disabled by setting:
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)


You can also do "make install/fast", which skips that dependency.
Using "make install/local" only stuff from the current directory is installed, 
but not from subdirs.

Alex


More information about the CMake mailing list