Alternative symlink-creating mode for file(INSTALL ...)

An new environment variable 'CMAKE_INSTALL_MODE' is introduced,
which can be used to ask CMake to create symbolic links
instead of copying files during a file(INSTALL ...).

The operation is at the file level only, directory trees are
still created using actual directories, not links.

Signed-off-by: Felix Lelchuk <felix.lelchuk@gmx.de>
This commit is contained in:
Felix Lelchuk
2021-08-02 19:42:26 +02:00
parent c15bb6f8b8
commit 58d10cf6f1
38 changed files with 964 additions and 3 deletions

View File

@@ -67,8 +67,9 @@ protected:
bool InstallSymlinkChain(std::string& fromFile, std::string& toFile);
bool InstallSymlink(const std::string& fromFile, const std::string& toFile);
bool InstallFile(const std::string& fromFile, const std::string& toFile,
MatchProperties match_properties);
virtual bool InstallFile(const std::string& fromFile,
const std::string& toFile,
MatchProperties match_properties);
bool InstallDirectory(const std::string& source,
const std::string& destination,
MatchProperties match_properties);