diff options
author | Brad King <brad.king@kitware.com> | 2009-04-29 12:46:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-04-29 12:46:56 (GMT) |
commit | f180a834bff54c51d7d30612249ebca4df39657c (patch) | |
tree | 76213f16abcfe93494f1d2546586c84cf5caa502 /Source/cmFileCommand.cxx | |
parent | dc0621ba5a6e3c6b5c587dd17b01c0846aaa2f23 (diff) | |
download | CMake-f180a834bff54c51d7d30612249ebca4df39657c.zip CMake-f180a834bff54c51d7d30612249ebca4df39657c.tar.gz CMake-f180a834bff54c51d7d30612249ebca4df39657c.tar.bz2 |
BUG: Error when install dir cannot be created
This teaches the undocumented file(INSTALL) command to report an error
when it cannot create the destination directory.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index b3c3ac1..d29e421 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -1192,6 +1192,10 @@ bool cmFileInstaller::InstallDirectory(const char* source, // Make sure the destination directory exists. if(!cmSystemTools::MakeDirectory(destination)) { + cmOStringStream e; + e << "INSTALL cannot make directory \"" << destination << "\": " + << cmSystemTools::GetLastSystemError(); + this->FileCommand->SetError(e.str().c_str()); return false; } |