diff options
author | Brad King <brad.king@kitware.com> | 2015-09-22 14:47:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-09-22 14:47:11 (GMT) |
commit | 442d17ef6c50a3ffc83ed6a860dc05febd85f1b4 (patch) | |
tree | cffd3ac5ce17204ab7430db4438046c0a0ead2cd /Source | |
parent | fcd9f85660bb0de569a5a5770b98eb7d922fbd6b (diff) | |
parent | b58de9fe2ba4ac3e194403ecd118fd54681ffae8 (diff) | |
download | CMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.zip CMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.tar.gz CMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.tar.bz2 |
Merge topic 'cpack-package-empty-dirs'
b58de9fe CPack: allow packaging of empty directories
47b060ae CPackDeb: allow empty directories in component packages
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmSystemTools.cxx | 21 |
3 files changed, 28 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 5cdab52..93c94e2 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -95,6 +95,7 @@ int cmCPackDebGenerator::PackageOnePack(std::string initialTopLevel, std::string findExpr(this->GetOption("GEN_WDIR")); findExpr += "/*"; gl.RecurseOn(); + gl.SetRecurseListDirs(true); if ( !gl.FindFiles(findExpr) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -222,6 +223,7 @@ int cmCPackDebGenerator::PackageComponentsAllInOne() std::string findExpr(this->GetOption("GEN_WDIR")); findExpr += "/*"; gl.RecurseOn(); + gl.SetRecurseListDirs(true); if ( !gl.FindFiles(findExpr) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 92a4b2b..aa4f181 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -367,6 +367,8 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install directory: " << top << std::endl); gl.RecurseOn(); + gl.SetRecurseListDirs(true); +// gl.SetRecurseThroughSymlinks(false); if ( !gl.FindFiles(findExpr) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, @@ -869,6 +871,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( cmsys::Glob glB; findExpr += "/*"; glB.RecurseOn(); + glB.SetRecurseListDirs(true); glB.FindFiles(findExpr); filesBefore = glB.GetFiles(); std::sort(filesBefore.begin(),filesBefore.end()); @@ -908,6 +911,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( { cmsys::Glob glA; glA.RecurseOn(); + glA.SetRecurseListDirs(true); glA.FindFiles(findExpr); std::vector<std::string> filesAfter = glA.GetFiles(); std::sort(filesAfter.begin(),filesAfter.end()); @@ -1074,6 +1078,7 @@ int cmCPackGenerator::DoPackage() std::string findExpr = tempDirectory; findExpr += "/*"; gl.RecurseOn(); + gl.SetRecurseListDirs(true); gl.SetRecurseThroughSymlinks(false); if ( !gl.FindFiles(findExpr) ) { diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 2675066..c24b5ea 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -895,12 +895,33 @@ std::string cmSystemTools::FileExistsInParentDirectories(const char* fname, bool cmSystemTools::cmCopyFile(const char* source, const char* destination) { + // FIXME remove if statement once kwsys SystemTools get support for + // source is directory handling in CopyFileAlways function + if(cmSystemTools::FileIsDirectory(source)) + { + return Superclass::MakeDirectory(destination); + } + return Superclass::CopyFileAlways(source, destination); } bool cmSystemTools::CopyFileIfDifferent(const char* source, const char* destination) { + // FIXME remove if statement once kwsys SystemTools get support for + // source is directory handling in CopyFileIfDifferent function + if(cmSystemTools::FileIsDirectory(source)) + { + if(SystemTools::FileExists(destination)) + { + return true; + } + else + { + return Superclass::MakeDirectory(destination); + } + } + return Superclass::CopyFileIfDifferent(source, destination); } |