diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-07 20:02:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:32 (GMT) |
commit | 473ca1ac4a5df336ff09ee2c666e437eabf43bc9 (patch) | |
tree | 1a98133fcda79243873ee7a8246b742097759cea /Source/CPack/cmCPackPackageMakerGenerator.cxx | |
parent | a5996111164a4c4121e7d1fa08dbcd0983bb3589 (diff) | |
download | CMake-473ca1ac4a5df336ff09ee2c666e437eabf43bc9.zip CMake-473ca1ac4a5df336ff09ee2c666e437eabf43bc9.tar.gz CMake-473ca1ac4a5df336ff09ee2c666e437eabf43bc9.tar.bz2 |
stringapi: Use string for OS X resource names
Diffstat (limited to 'Source/CPack/cmCPackPackageMakerGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackPackageMakerGenerator.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index c5b9c6f..69886a1 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -553,8 +553,9 @@ int cmCPackPackageMakerGenerator::InitializeInternal() } //---------------------------------------------------------------------- -bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, - const char* dirName) +bool cmCPackPackageMakerGenerator::CopyCreateResourceFile( + const std::string& name, + const std::string& dirName) { std::string uname = cmSystemTools::UpperCase(name); std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; @@ -563,7 +564,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, { cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() << " not specified. It should point to " - << (name ? name : "(NULL)") + << (!name.empty() ? name : "<empty>") << ".rtf, " << name << ".html, or " << name << ".txt file" << std::endl); return false; @@ -571,7 +572,7 @@ bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name, if ( !cmSystemTools::FileExists(inFileName) ) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " - << (name ? name : "(NULL)") + << (!name.empty() ? name : "<empty>") << " resource file: " << inFileName << std::endl); return false; } |