cmake: offer command-line abstraction for install scripts
Currently one may use
cmake --build . --target install to build and install.
!3069 (merged) proposes a
cmake --install . variant. Discussion there raised a few points that would be better worked out in an issue first, so I'm opening this.
cmake --install .is a sensible abstraction over the current
cmake ... -P cmake_install.cmakesupport.
- When does installation also build?
- Re-linking (
make preinstall) may be needed before directly invoking
- The Ninja generator does not provide the
preinstalltarget. This is an existing limitation that should be worked out regardless of the rest of this issue.