mirror of
https://github.com/reactos/CMake.git
synced 2024-11-23 03:29:47 +00:00
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
This commit is contained in:
parent
12fed3edb1
commit
d7204e649e
@ -1,9 +1,9 @@
|
||||
#ifdef __cplusplus
|
||||
#error "A C++ compiler has been selected for C."
|
||||
# error "A C++ compiler has been selected for C."
|
||||
#endif
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
#define const
|
||||
# define const
|
||||
#endif
|
||||
|
||||
#include "CMakeCompilerABI.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef __CUDACC__
|
||||
#error "A C or C++ compiler has been selected for CUDA"
|
||||
# error "A C or C++ compiler has been selected for CUDA"
|
||||
#endif
|
||||
|
||||
#include "CMakeCompilerABI.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef __cplusplus
|
||||
#error "A C compiler has been selected for C++."
|
||||
# error "A C compiler has been selected for C++."
|
||||
#endif
|
||||
|
||||
#include "CMakeCompilerABI.h"
|
||||
|
@ -11,27 +11,27 @@ const char info_sizeof_dptr[] = {
|
||||
|
||||
/* Application Binary Interface. */
|
||||
#if defined(__sgi) && defined(_ABIO32)
|
||||
#define ABI_ID "ELF O32"
|
||||
# define ABI_ID "ELF O32"
|
||||
#elif defined(__sgi) && defined(_ABIN32)
|
||||
#define ABI_ID "ELF N32"
|
||||
# define ABI_ID "ELF N32"
|
||||
#elif defined(__sgi) && defined(_ABI64)
|
||||
#define ABI_ID "ELF 64"
|
||||
# define ABI_ID "ELF 64"
|
||||
|
||||
/* Check for (some) ARM ABIs.
|
||||
* See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
|
||||
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
|
||||
#define ABI_ID "ELF ARMEABI"
|
||||
# define ABI_ID "ELF ARMEABI"
|
||||
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
|
||||
#define ABI_ID "ELF ARM"
|
||||
# define ABI_ID "ELF ARM"
|
||||
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
|
||||
#define ABI_ID "ELF ARM"
|
||||
# define ABI_ID "ELF ARM"
|
||||
|
||||
#elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
|
||||
defined(__ILP32__)
|
||||
#define ABI_ID "ELF X32"
|
||||
# define ABI_ID "ELF X32"
|
||||
|
||||
#elif defined(__ELF__)
|
||||
#define ABI_ID "ELF"
|
||||
# define ABI_ID "ELF"
|
||||
#endif
|
||||
|
||||
#if defined(ABI_ID)
|
||||
|
@ -1,19 +1,19 @@
|
||||
#ifdef CHECK_FUNCTION_EXISTS
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
# endif
|
||||
char
|
||||
CHECK_FUNCTION_EXISTS(void);
|
||||
#ifdef __CLASSIC_C__
|
||||
# ifdef __CLASSIC_C__
|
||||
int main()
|
||||
{
|
||||
int ac;
|
||||
char* av[];
|
||||
#else
|
||||
# else
|
||||
int main(int ac, char* av[])
|
||||
{
|
||||
#endif
|
||||
# endif
|
||||
CHECK_FUNCTION_EXISTS();
|
||||
if (ac > 1000) {
|
||||
return *av[0];
|
||||
@ -23,6 +23,6 @@ int main(int ac, char* av[])
|
||||
|
||||
#else /* CHECK_FUNCTION_EXISTS */
|
||||
|
||||
#error "CHECK_FUNCTION_EXISTS has to specify the function"
|
||||
# error "CHECK_FUNCTION_EXISTS has to specify the function"
|
||||
|
||||
#endif /* CHECK_FUNCTION_EXISTS */
|
||||
|
@ -2,15 +2,15 @@
|
||||
|
||||
extern int CHECK_VARIABLE_EXISTS;
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
# ifdef __CLASSIC_C__
|
||||
int main()
|
||||
{
|
||||
int ac;
|
||||
char* av[];
|
||||
#else
|
||||
# else
|
||||
int main(int ac, char* av[])
|
||||
{
|
||||
#endif
|
||||
# endif
|
||||
if (ac > 1000) {
|
||||
return *av[0];
|
||||
}
|
||||
@ -19,6 +19,6 @@ int main(int ac, char* av[])
|
||||
|
||||
#else /* CHECK_VARIABLE_EXISTS */
|
||||
|
||||
#error "CHECK_VARIABLE_EXISTS has to specify the variable"
|
||||
# error "CHECK_VARIABLE_EXISTS has to specify the variable"
|
||||
|
||||
#endif /* CHECK_VARIABLE_EXISTS */
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <mpi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstdio>
|
||||
# include <cstdio>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include <mpi.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstdio>
|
||||
# include <cstdio>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
# include <stdio.h>
|
||||
#endif
|
||||
|
||||
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
||||
@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N',
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
||||
#ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
std::puts(mpiver_str);
|
||||
#else
|
||||
# else
|
||||
puts(mpiver_str);
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
#ifdef TEST_MPI_MPICXX
|
||||
MPI::MPI_Init(&argc, &argv);
|
||||
|
@ -61,7 +61,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
||||
ifwCmd += " --repository " + rd;
|
||||
}
|
||||
} else {
|
||||
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||
cmCPackIFWLogger(WARNING,
|
||||
"The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||
<< "variable is set, but content will be skipped, "
|
||||
<< "because this feature available only since "
|
||||
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||
@ -93,7 +94,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
||||
ofs << "# Run command: " << ifwCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackIFWLogger(ERROR, "Problem running IFW command: "
|
||||
cmCPackIFWLogger(ERROR,
|
||||
"Problem running IFW command: "
|
||||
<< ifwCmd << std::endl
|
||||
<< "Please check " << ifwTmpFile << " for errors"
|
||||
<< std::endl);
|
||||
@ -102,15 +104,16 @@ int cmCPackIFWGenerator::PackageFiles()
|
||||
|
||||
if (!this->Repository.RepositoryUpdate.empty() &&
|
||||
!this->Repository.PatchUpdatesXml()) {
|
||||
cmCPackIFWLogger(WARNING, "Problem patch IFW \"Updates\" "
|
||||
cmCPackIFWLogger(WARNING,
|
||||
"Problem patch IFW \"Updates\" "
|
||||
<< "file: "
|
||||
<< this->toplevel + "/repository/Updates.xml"
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
cmCPackIFWLogger(OUTPUT, "- repository: " << this->toplevel
|
||||
<< "/repository generated"
|
||||
<< std::endl);
|
||||
cmCPackIFWLogger(OUTPUT,
|
||||
"- repository: " << this->toplevel
|
||||
<< "/repository generated" << std::endl);
|
||||
}
|
||||
|
||||
// Run binary creator
|
||||
@ -145,7 +148,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
||||
ifwCmd += " --repository " + rd;
|
||||
}
|
||||
} else {
|
||||
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||
cmCPackIFWLogger(WARNING,
|
||||
"The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||
<< "variable is set, but content will be skipped, "
|
||||
<< "because this feature available only since "
|
||||
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||
@ -203,7 +207,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
||||
ofs << "# Run command: " << ifwCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackIFWLogger(ERROR, "Problem running IFW command: "
|
||||
cmCPackIFWLogger(ERROR,
|
||||
"Problem running IFW command: "
|
||||
<< ifwCmd << std::endl
|
||||
<< "Please check " << ifwTmpFile << " for errors"
|
||||
<< std::endl);
|
||||
@ -257,8 +262,9 @@ int cmCPackIFWGenerator::InitializeInternal()
|
||||
}
|
||||
|
||||
if (this->BinCreator.empty()) {
|
||||
cmCPackIFWLogger(ERROR, "Cannot find QtIFW compiler \"binarycreator\": "
|
||||
"likely it is not installed, or not in your PATH"
|
||||
cmCPackIFWLogger(ERROR,
|
||||
"Cannot find QtIFW compiler \"binarycreator\": "
|
||||
"likely it is not installed, or not in your PATH"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
@ -415,7 +421,8 @@ cmCPackComponent* cmCPackIFWGenerator::GetComponent(
|
||||
}
|
||||
} else {
|
||||
this->Packages.erase(name);
|
||||
cmCPackIFWLogger(ERROR, "Cannot configure package \""
|
||||
cmCPackIFWLogger(ERROR,
|
||||
"Cannot configure package \""
|
||||
<< name << "\" for component \"" << component->Name
|
||||
<< "\"" << std::endl);
|
||||
}
|
||||
@ -450,7 +457,8 @@ cmCPackComponentGroup* cmCPackIFWGenerator::GetComponentGroup(
|
||||
this->BinaryPackages.insert(package);
|
||||
} else {
|
||||
this->Packages.erase(name);
|
||||
cmCPackIFWLogger(ERROR, "Cannot configure package \""
|
||||
cmCPackIFWLogger(ERROR,
|
||||
"Cannot configure package \""
|
||||
<< name << "\" for component group \"" << group->Name
|
||||
<< "\"" << std::endl);
|
||||
}
|
||||
@ -596,7 +604,8 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
|
||||
} else {
|
||||
this->Repositories.erase(repositoryName);
|
||||
repository = nullptr;
|
||||
cmCPackIFWLogger(WARNING, "Invalid repository \""
|
||||
cmCPackIFWLogger(WARNING,
|
||||
"Invalid repository \""
|
||||
<< repositoryName << "\""
|
||||
<< " configuration. Repository will be skipped."
|
||||
<< std::endl);
|
||||
|
@ -22,7 +22,9 @@
|
||||
*
|
||||
* http://qt-project.org/doc/qtinstallerframework/index.html
|
||||
*/
|
||||
class cmCPackIFWGenerator : public cmCPackGenerator, public cmCPackIFWCommon
|
||||
class cmCPackIFWGenerator
|
||||
: public cmCPackGenerator
|
||||
, public cmCPackIFWCommon
|
||||
{
|
||||
public:
|
||||
cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator);
|
||||
|
@ -24,7 +24,8 @@ void cmCPackIFWInstaller::printSkippedOptionWarning(
|
||||
const std::string& optionName, const std::string& optionValue)
|
||||
{
|
||||
cmCPackIFWLogger(
|
||||
WARNING, "Option "
|
||||
WARNING,
|
||||
"Option "
|
||||
<< optionName << " is set to \"" << optionValue
|
||||
<< "\" but will be skipped because the specified file does not exist."
|
||||
<< std::endl);
|
||||
@ -146,7 +147,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
|
||||
if (this->WizardStyle != "Modern" && this->WizardStyle != "Aero" &&
|
||||
this->WizardStyle != "Mac" && this->WizardStyle != "Classic") {
|
||||
cmCPackIFWLogger(
|
||||
WARNING, "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
|
||||
WARNING,
|
||||
"Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
|
||||
<< option << "\". Expected values are: Modern, Aero, Mac, Classic."
|
||||
<< std::endl);
|
||||
}
|
||||
@ -469,7 +471,8 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
||||
cmsys::SystemTools::CopyFileIfDifferent(this->Resources[i], path);
|
||||
resources.push_back(std::move(name));
|
||||
} else {
|
||||
cmCPackIFWLogger(WARNING, "Can't copy resources from \""
|
||||
cmCPackIFWLogger(WARNING,
|
||||
"Can't copy resources from \""
|
||||
<< this->Resources[i]
|
||||
<< "\". Resource will be skipped." << std::endl);
|
||||
}
|
||||
|
@ -226,7 +226,8 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
|
||||
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
||||
this->SortingPriority = option;
|
||||
cmCPackIFWLogger(
|
||||
WARNING, "The \"PRIORITY\" option is set "
|
||||
WARNING,
|
||||
"The \"PRIORITY\" option is set "
|
||||
<< "for component \"" << component->Name << "\", but there option is "
|
||||
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
||||
<< std::endl);
|
||||
@ -303,7 +304,8 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
|
||||
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
||||
this->SortingPriority = option;
|
||||
cmCPackIFWLogger(
|
||||
WARNING, "The \"PRIORITY\" option is set "
|
||||
WARNING,
|
||||
"The \"PRIORITY\" option is set "
|
||||
<< "for component group \"" << group->Name
|
||||
<< "\", but there option is "
|
||||
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#include <sys/cygwin.h>
|
||||
# include <sys/cygwin.h>
|
||||
std::string CMakeToWixPath(const std::string& cygpath)
|
||||
{
|
||||
std::vector<char> winpath_chars;
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include "cmsys/SystemTools.hxx"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <rpc.h> // for GUID generation (windows only)
|
||||
# include <rpc.h> // for GUID generation (windows only)
|
||||
#else
|
||||
#include <uuid/uuid.h> // for GUID generation (libuuid)
|
||||
# include <uuid/uuid.h> // for GUID generation (libuuid)
|
||||
#endif
|
||||
|
||||
#include "cmCMakeToWixPath.h"
|
||||
@ -55,8 +55,8 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
|
||||
{
|
||||
std::string logFileName = this->CPackTopLevel + "/wix.log";
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Running WiX command: " << command
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Running WiX command: " << command << std::endl);
|
||||
|
||||
std::string output;
|
||||
|
||||
@ -71,8 +71,9 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
|
||||
logFile.close();
|
||||
|
||||
if (!status || returnValue) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running WiX candle. "
|
||||
"Please check '"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running WiX candle. "
|
||||
"Please check '"
|
||||
<< logFileName << "' for errors." << std::endl);
|
||||
|
||||
return false;
|
||||
@ -137,8 +138,8 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
|
||||
int cmCPackWIXGenerator::PackageFiles()
|
||||
{
|
||||
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Fatal WiX Generator Error"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Fatal WiX Generator Error" << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -148,8 +149,8 @@ int cmCPackWIXGenerator::PackageFiles()
|
||||
bool cmCPackWIXGenerator::InitializeWiXConfiguration()
|
||||
{
|
||||
if (!ReadListFile("CPackWIX.cmake")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while executing CPackWIX.cmake"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error while executing CPackWIX.cmake" << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -166,12 +167,13 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
|
||||
std::string guid = GenerateGUID();
|
||||
SetOption("CPACK_WIX_UPGRADE_GUID", guid.c_str());
|
||||
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_WARNING, "CPACK_WIX_UPGRADE_GUID implicitly set to "
|
||||
<< guid << " . "
|
||||
"Please refer to the documentation on how and why "
|
||||
"you might want to set this explicitly."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||
"CPACK_WIX_UPGRADE_GUID implicitly set to "
|
||||
<< guid
|
||||
<< " . "
|
||||
"Please refer to the documentation on how and why "
|
||||
"you might want to set this explicitly."
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
if (!RequireOption("CPACK_TOPLEVEL_DIRECTORY", this->CPackTopLevel)) {
|
||||
@ -370,8 +372,9 @@ void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile()
|
||||
includeFile.AddAttribute("Id", "FindInstallLocation");
|
||||
includeFile.AddAttribute("Root", "HKLM");
|
||||
includeFile.AddAttribute(
|
||||
"Key", "Software\\Microsoft\\Windows\\"
|
||||
"CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
|
||||
"Key",
|
||||
"Software\\Microsoft\\Windows\\"
|
||||
"CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
|
||||
includeFile.AddAttribute("Name", "InstallLocation");
|
||||
includeFile.AddAttribute("Type", "raw");
|
||||
includeFile.EndElement("RegistrySearch");
|
||||
@ -613,8 +616,9 @@ bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate()
|
||||
std::string mainSourceFilePath = this->CPackTopLevel + "/main.wxs";
|
||||
|
||||
if (!ConfigureFile(wixTemplate.c_str(), mainSourceFilePath.c_str())) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed creating '"
|
||||
<< mainSourceFilePath << "'' from template." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Failed creating '" << mainSourceFilePath
|
||||
<< "'' from template." << std::endl);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -957,8 +961,8 @@ bool cmCPackWIXGenerator::RequireOption(std::string const& name,
|
||||
|
||||
return true;
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Required variable "
|
||||
<< name << " not set" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Required variable " << name << " not set" << std::endl);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -66,8 +66,9 @@ void cmWIXAccessControlList::CreatePermissionElement(std::string const& entry)
|
||||
void cmWIXAccessControlList::ReportError(std::string const& entry,
|
||||
std::string const& message)
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed processing ACL entry '"
|
||||
<< entry << "': " << message << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Failed processing ACL entry '" << entry << "': " << message
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
|
||||
|
@ -13,8 +13,9 @@ bool cmWIXPatch::LoadFragments(std::string const& patchFilePath)
|
||||
{
|
||||
cmWIXPatchParser parser(Fragments, Logger);
|
||||
if (!parser.ParseFile(patchFilePath.c_str())) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed parsing XML patch file: '"
|
||||
<< patchFilePath << "'" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Failed parsing XML patch file: '" << patchFilePath << "'"
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,8 @@ cmWIXSourceWriter::cmWIXSourceWriter(cmCPackLog* logger,
|
||||
cmWIXSourceWriter::~cmWIXSourceWriter()
|
||||
{
|
||||
if (Elements.size() > 1) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, Elements.size() - 1
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
Elements.size() - 1
|
||||
<< " WiX elements were still open when closing '"
|
||||
<< SourceFilename << "'" << std::endl);
|
||||
return;
|
||||
@ -65,7 +66,8 @@ void cmWIXSourceWriter::EndElement(std::string const& name)
|
||||
}
|
||||
|
||||
if (Elements.back() != name) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "WiX element <"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"WiX element <"
|
||||
<< Elements.back() << "> can not be closed by </" << name
|
||||
<< "> in '" << SourceFilename << "'" << std::endl);
|
||||
return;
|
||||
|
@ -87,8 +87,9 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
|
||||
archive.Add(rp, 0, nullptr, false);
|
||||
if (!archive) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
|
||||
<< archive.GetError() << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"ERROR while packaging files: " << archive.GetError()
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -111,7 +112,8 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
|
||||
} \
|
||||
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
|
||||
if (!(archive)) { \
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
||||
"Problem to create archive < " \
|
||||
<< (filename) << ">. ERROR =" << (archive).GetError() \
|
||||
<< std::endl); \
|
||||
return 0; \
|
||||
@ -148,7 +150,8 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
|
||||
// Does the component belong to a group?
|
||||
if (comp.second.Group == nullptr) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
||||
cmCPackLog::LOG_VERBOSE,
|
||||
"Component <"
|
||||
<< comp.second.Name
|
||||
<< "> does not belong to any group, package it separately."
|
||||
<< std::endl);
|
||||
@ -258,7 +261,8 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||
std::string rp = cmSystemTools::RelativePath(toplevel, file);
|
||||
archive.Add(rp, 0, nullptr, false);
|
||||
if (!archive) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem while adding file< "
|
||||
<< file << "> to archive <" << packageFileNames[0]
|
||||
<< "> .ERROR =" << archive.GetError() << std::endl);
|
||||
return 0;
|
||||
|
@ -32,8 +32,8 @@ int cmCPackBundleGenerator::InitializeInternal()
|
||||
"codesign", std::vector<std::string>(), false);
|
||||
|
||||
if (codesign_path.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate codesign command"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot locate codesign command" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_CODESIGN", codesign_path.c_str());
|
||||
@ -59,8 +59,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
||||
? this->GetOption("CPACK_BUNDLE_NAME")
|
||||
: "";
|
||||
if (cpack_bundle_name.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_NAME must be set."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_BUNDLE_NAME must be set." << std::endl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -69,8 +69,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
||||
? this->GetOption("CPACK_BUNDLE_PLIST")
|
||||
: "";
|
||||
if (cpack_bundle_plist.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_PLIST must be set."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_BUNDLE_PLIST must be set." << std::endl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -79,8 +79,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
||||
? this->GetOption("CPACK_BUNDLE_ICON")
|
||||
: "";
|
||||
if (cpack_bundle_icon.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_ICON must be set."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_BUNDLE_ICON must be set." << std::endl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -269,8 +269,8 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Application has been codesigned"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Application has been codesigned" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
(this->GetOption("CPACK_BUNDLE_APPLE_ENTITLEMENTS")
|
||||
? "with entitlement sandboxing"
|
||||
|
@ -15,8 +15,8 @@
|
||||
// system tools because it is not implemented robustly enough to move
|
||||
// files across directories.
|
||||
#ifdef _WIN32
|
||||
#include "cm_sys_stat.h"
|
||||
#include <windows.h>
|
||||
# include "cm_sys_stat.h"
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator()
|
||||
@ -73,7 +73,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
||||
if (!cmSystemTools::CopyFileAlways(
|
||||
this->GetOption("CPACK_CYGWIN_PATCH_FILE"),
|
||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: ["
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"problem copying: ["
|
||||
<< this->GetOption("CPACK_CYGWIN_PATCH_FILE") << "]\nto\n["
|
||||
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
||||
return 0;
|
||||
@ -87,7 +88,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
||||
if (!cmSystemTools::CopyFileAlways(
|
||||
this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"),
|
||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"problem copying: "
|
||||
<< this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT") << "\nto\n"
|
||||
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
||||
return 0;
|
||||
@ -96,7 +98,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
||||
outerTarFile += "-";
|
||||
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
||||
if (!patch) {
|
||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
|
||||
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||
"CPACK_CYGWIN_PATCH_NUMBER"
|
||||
<< " not specified, defaulting to 1\n");
|
||||
patch = "1";
|
||||
}
|
||||
@ -147,7 +150,8 @@ const char* cmCPackCygwinSourceGenerator::GetOutputExtension()
|
||||
this->OutputExtension = "-";
|
||||
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
||||
if (!patch) {
|
||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
|
||||
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||
"CPACK_CYGWIN_PATCH_NUMBER"
|
||||
<< " not specified, defaulting to 1\n");
|
||||
patch = "1";
|
||||
}
|
||||
|
@ -62,8 +62,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
|
||||
this->SetOption("CPACK_DEB_PACKAGE_COMPONENT_PART_PATH",
|
||||
component_path.c_str());
|
||||
if (!this->ReadListFile("CPackDeb.cmake")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error while execution CPackDeb.cmake" << std::endl);
|
||||
retval = 0;
|
||||
return retval;
|
||||
}
|
||||
@ -115,7 +115,8 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
|
||||
// Does the component belong to a group?
|
||||
if (comp.second.Group == nullptr) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
||||
cmCPackLog::LOG_VERBOSE,
|
||||
"Component <"
|
||||
<< comp.second.Name
|
||||
<< "> does not belong to any group, package it separately."
|
||||
<< std::endl);
|
||||
@ -179,8 +180,8 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
|
||||
component_path.c_str());
|
||||
}
|
||||
if (!this->ReadListFile("CPackDeb.cmake")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error while execution CPackDeb.cmake" << std::endl);
|
||||
retval = 0;
|
||||
return retval;
|
||||
}
|
||||
@ -413,7 +414,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
cmGeneratedFileStream fileStream_data_tar;
|
||||
fileStream_data_tar.Open(filename_data_tar.c_str(), false, true);
|
||||
if (!fileStream_data_tar) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error opening the file \""
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error opening the file \""
|
||||
<< filename_data_tar << "\" for writing" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
@ -430,9 +432,9 @@ int cmCPackDebGenerator::createDeb()
|
||||
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would
|
||||
// give /usr and /opt
|
||||
size_t topLevelLength = strGenWDIR.length();
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "WDIR: \""
|
||||
<< strGenWDIR << "\", length = " << topLevelLength
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"WDIR: \"" << strGenWDIR << "\", length = " << topLevelLength
|
||||
<< std::endl);
|
||||
std::set<std::string> orderedFiles;
|
||||
|
||||
// we have to reconstruct the parent folders as well
|
||||
@ -448,13 +450,13 @@ int cmCPackDebGenerator::createDeb()
|
||||
}
|
||||
|
||||
for (std::string const& file : orderedFiles) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "FILEIT: \"" << file << "\""
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"FILEIT: \"" << file << "\"" << std::endl);
|
||||
std::string::size_type slashPos = file.find('/', topLevelLength + 1);
|
||||
std::string relativeDir =
|
||||
file.substr(topLevelLength, slashPos - topLevelLength);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \""
|
||||
<< relativeDir << "\"" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"RELATIVEDIR: \"" << relativeDir << "\"" << std::endl);
|
||||
|
||||
#ifdef WIN32
|
||||
std::string mode_t_adt_filename = file + ":cmake_mode_t";
|
||||
@ -477,7 +479,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
|
||||
// do not recurse because the loop will do it
|
||||
if (!data_tar.Add(file, topLevelLength, ".", false)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem adding file to tar:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem adding file to tar:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << strGenWDIR << std::endl
|
||||
<< "#file: " << file << std::endl
|
||||
@ -505,8 +508,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
std::string output =
|
||||
cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5);
|
||||
if (output.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of "
|
||||
<< file << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem computing the md5 of " << file << std::endl);
|
||||
}
|
||||
|
||||
output += " " + file + "\n";
|
||||
@ -527,9 +530,10 @@ int cmCPackDebGenerator::createDeb()
|
||||
cmGeneratedFileStream fileStream_control_tar;
|
||||
fileStream_control_tar.Open(filename_control_tar.c_str(), false, true);
|
||||
if (!fileStream_control_tar) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error opening the file \""
|
||||
<< filename_control_tar << "\" for writing"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error opening the file \"" << filename_control_tar
|
||||
<< "\" for writing"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
cmArchiveWrite control_tar(fileStream_control_tar,
|
||||
@ -557,7 +561,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
// adds control and md5sums
|
||||
if (!control_tar.Add(md5filename, strGenWDIR.length(), ".") ||
|
||||
!control_tar.Add(strGenWDIR + "/control", strGenWDIR.length(), ".")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error adding file to tar:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << strGenWDIR << std::endl
|
||||
<< "#file: \"control\" or \"md5sums\"" << std::endl
|
||||
@ -568,7 +573,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
// adds generated shlibs file
|
||||
if (gen_shibs) {
|
||||
if (!control_tar.Add(shlibsfilename, strGenWDIR.length(), ".")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error adding file to tar:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << strGenWDIR << std::endl
|
||||
<< "#file: \"shlibs\"" << std::endl
|
||||
@ -581,7 +587,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTINST")) {
|
||||
control_tar.SetPermissions(permission755);
|
||||
if (!control_tar.Add(postinst, strGenWDIR.length(), ".")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error adding file to tar:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << strGenWDIR << std::endl
|
||||
<< "#file: \"postinst\"" << std::endl
|
||||
@ -594,7 +601,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTRM")) {
|
||||
control_tar.SetPermissions(permission755);
|
||||
if (!control_tar.Add(postrm, strGenWDIR.length(), ".")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding file to tar:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error adding file to tar:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << strGenWDIR << std::endl
|
||||
<< "#file: \"postinst\"" << std::endl
|
||||
@ -659,7 +667,8 @@ int cmCPackDebGenerator::createDeb()
|
||||
if (!deb.Add(tlDir + "debian-binary", tlDir.length()) ||
|
||||
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
|
||||
!deb.Add(tlDir + "data.tar" + compression_suffix, tlDir.length())) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error creating debian package:"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error creating debian package:"
|
||||
<< std::endl
|
||||
<< "#top level directory: " << outputDir << std::endl
|
||||
<< "#file: " << outputName << std::endl
|
||||
|
@ -21,7 +21,7 @@
|
||||
// For the old LocaleStringToLangAndRegionCodes() function, to convert
|
||||
// to the old Script Manager RegionCode values needed for the 'LPic' data
|
||||
// structure used for generating multi-lingual SLAs.
|
||||
#include <CoreServices/CoreServices.h>
|
||||
# include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
|
||||
static const char* SLAHeader =
|
||||
@ -77,8 +77,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
||||
const std::string hdiutil_path =
|
||||
cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
|
||||
if (hdiutil_path.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate hdiutil command"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot locate hdiutil command" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
|
||||
@ -86,16 +86,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
||||
const std::string setfile_path =
|
||||
cmSystemTools::FindProgram("SetFile", paths, false);
|
||||
if (setfile_path.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate SetFile command"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot locate SetFile command" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
|
||||
|
||||
const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false);
|
||||
if (rez_path.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate Rez command"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot locate Rez command" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
|
||||
@ -124,8 +124,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
||||
return 0;
|
||||
}
|
||||
if (!cmSystemTools::FileExists(slaDirectory, false)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_DMG_SLA_DIR does not exist"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_DMG_SLA_DIR does not exist" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -140,14 +140,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
||||
for (auto const& language : languages) {
|
||||
std::string license = slaDirectory + "/" + language + ".license.txt";
|
||||
if (!singleLicense && !cmSystemTools::FileExists(license)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing license file "
|
||||
<< language << ".license.txt" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Missing license file " << language << ".license.txt"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
std::string menu = slaDirectory + "/" + language + ".menu.txt";
|
||||
if (!cmSystemTools::FileExists(menu)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing menu file "
|
||||
<< language << ".menu.txt" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Missing menu file " << language << ".menu.txt"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -212,8 +214,9 @@ bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
|
||||
{
|
||||
if (!cmSystemTools::CopyFileIfDifferent(source.str().c_str(),
|
||||
target.str().c_str())) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying "
|
||||
<< source.str() << " to " << target.str() << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error copying " << source.str() << " to " << target.str()
|
||||
<< std::endl);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -248,8 +251,8 @@ bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
|
||||
this->GeneratorVerbose, cmDuration::zero());
|
||||
|
||||
if (!result || exit_code) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str()
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error executing: " << command.str() << std::endl);
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -400,8 +403,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
std::ostringstream dummy_padding;
|
||||
dummy_padding << staging.str() << "/.dummy-padding-file";
|
||||
if (!this->CreateEmptyFile(dummy_padding, 1048576)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error creating dummy padding file."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error creating dummy padding file." << std::endl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -460,8 +463,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
std::ostringstream dummy_padding;
|
||||
dummy_padding << temp_mount << "/.dummy-padding-file";
|
||||
if (!cmSystemTools::RemoveFile(dummy_padding.str())) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error removing dummy padding file."
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error removing dummy padding file." << std::endl);
|
||||
|
||||
had_error = true;
|
||||
}
|
||||
@ -565,8 +568,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
CFLocaleCreateCanonicalLanguageIdentifierFromString(
|
||||
nullptr, language_cfstring);
|
||||
if (!iso_language) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
|
||||
<< " is not a recognized language" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
languages[i] << " is not a recognized language"
|
||||
<< std::endl);
|
||||
}
|
||||
char iso_language_cstr[65];
|
||||
CFStringGetCString(iso_language, iso_language_cstr,
|
||||
@ -638,9 +642,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
ofs.Close();
|
||||
|
||||
if (have_write_license_error) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error writing license file to SLA."
|
||||
<< std::endl
|
||||
<< error << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error writing license file to SLA." << std::endl
|
||||
<< error
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -692,9 +697,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
embed_sla_command << "\"" << temp_image << "\"";
|
||||
|
||||
if (!this->RunCommand(embed_sla_command, &error)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding SLA." << std::endl
|
||||
<< error
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error adding SLA." << std::endl
|
||||
<< error << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -726,9 +731,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
||||
std::string convert_error;
|
||||
|
||||
if (!this->RunCommand(final_image_command, &convert_error)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error compressing disk image."
|
||||
<< std::endl
|
||||
<< convert_error << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error compressing disk image." << std::endl
|
||||
<< convert_error
|
||||
<< std::endl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#if defined(__HAIKU__)
|
||||
#include <FindDirectory.h>
|
||||
#include <StorageDefs.h>
|
||||
# include <FindDirectory.h>
|
||||
# include <StorageDefs.h>
|
||||
#endif
|
||||
|
||||
cmCPackGenerator::cmCPackGenerator()
|
||||
@ -61,9 +61,10 @@ int cmCPackGenerator::PrepareNames()
|
||||
// checks CPACK_SET_DESTDIR support
|
||||
if (IsOn("CPACK_SET_DESTDIR")) {
|
||||
if (SETDESTDIR_UNSUPPORTED == SupportsSetDestdir()) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "CPACK_SET_DESTDIR is set to ON but the '"
|
||||
<< Name << "' generator does NOT support it." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_SET_DESTDIR is set to ON but the '"
|
||||
<< Name << "' generator does NOT support it."
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
if (SETDESTDIR_SHOULD_NOT_BE_USED == SupportsSetDestdir()) {
|
||||
@ -92,8 +93,8 @@ int cmCPackGenerator::PrepareNames()
|
||||
std::string outName = pfname;
|
||||
tempDirectory += "/" + outName;
|
||||
if (!this->GetOutputExtension()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "No output extension specified"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"No output extension specified" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
outName += this->GetOutputExtension();
|
||||
@ -125,8 +126,8 @@ int cmCPackGenerator::PrepareNames()
|
||||
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
|
||||
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
|
||||
if (descFileName) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for: " << descFileName
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Look for: " << descFileName << std::endl);
|
||||
if (!cmSystemTools::FileExists(descFileName)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find description file name: ["
|
||||
@ -161,8 +162,9 @@ int cmCPackGenerator::PrepareNames()
|
||||
const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM");
|
||||
if (algoSignature) {
|
||||
if (!cmCryptoHash::New(algoSignature)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot recognize algorithm: "
|
||||
<< algoSignature << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot recognize algorithm: " << algoSignature
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -215,7 +217,8 @@ int cmCPackGenerator::InstallProject()
|
||||
cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
|
||||
for (const auto& arg : items) {
|
||||
if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Invalid permission value '"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Invalid permission value '"
|
||||
<< arg
|
||||
<< "'."
|
||||
" CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "
|
||||
@ -289,10 +292,11 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
||||
ofs << "# Run command: " << ic << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Problem running install command: "
|
||||
<< ic << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running install command: "
|
||||
<< ic << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -376,8 +380,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||
}
|
||||
std::string filePath = tempDir;
|
||||
filePath += "/" + subdir + "/" + cmSystemTools::RelativePath(top, gf);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
||||
<< inFile << " -> " << filePath << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Copy file: " << inFile << " -> " << filePath
|
||||
<< std::endl);
|
||||
/* If the file is a symlink we will have to re-create it */
|
||||
if (cmSystemTools::FileIsSymlink(inFile)) {
|
||||
std::string targetFile;
|
||||
@ -392,8 +397,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||
filePath.c_str()) &&
|
||||
cmSystemTools::CopyFileTime(inFile.c_str(),
|
||||
filePath.c_str()))) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
||||
<< inFile << " -> " << filePath << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem copying file: " << inFile << " -> "
|
||||
<< filePath << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -402,40 +408,44 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
||||
std::string curDir = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
std::string goToDir = tempDir;
|
||||
goToDir += "/" + subdir;
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Change dir to: " << goToDir
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Change dir to: " << goToDir << std::endl);
|
||||
cmWorkingDirectory workdir(goToDir);
|
||||
if (workdir.Failed()) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Failed to change working directory to "
|
||||
<< goToDir << " : " << std::strerror(workdir.GetLastResult())
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Failed to change working directory to "
|
||||
<< goToDir << " : "
|
||||
<< std::strerror(workdir.GetLastResult())
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
for (auto const& symlinked : symlinkedFiles) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Will create a symlink: "
|
||||
<< symlinked.second << "--> " << symlinked.first
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Will create a symlink: " << symlinked.second << "--> "
|
||||
<< symlinked.first
|
||||
<< std::endl);
|
||||
// make sure directory exists for symlink
|
||||
std::string destDir =
|
||||
cmSystemTools::GetFilenamePath(symlinked.second);
|
||||
if (!destDir.empty() &&
|
||||
!cmSystemTools::MakeDirectory(destDir, default_dir_mode)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create dir: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot create dir: "
|
||||
<< destDir << "\nTrying to create symlink: "
|
||||
<< symlinked.second << "--> " << symlinked.first
|
||||
<< std::endl);
|
||||
}
|
||||
if (!cmSystemTools::CreateSymlink(symlinked.first,
|
||||
symlinked.second)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create symlink: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot create symlink: "
|
||||
<< symlinked.second << "--> " << symlinked.first
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Going back to: " << curDir
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Going back to: " << curDir << std::endl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -447,8 +457,8 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
||||
{
|
||||
const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT");
|
||||
if (cmakeScripts && *cmakeScripts) {
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install scripts: " << cmakeScripts
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Install scripts: " << cmakeScripts << std::endl);
|
||||
std::vector<std::string> cmakeScriptsVector;
|
||||
cmSystemTools::ExpandListArgument(cmakeScripts, cmakeScriptsVector);
|
||||
for (std::string const& installScript : cmakeScriptsVector) {
|
||||
@ -603,8 +613,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
preinstall, buildConfig, "", false);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"- Install command: " << buildCommand << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Run preinstall target for: "
|
||||
<< installProjectName << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Run preinstall target for: " << installProjectName
|
||||
<< std::endl);
|
||||
std::string output;
|
||||
int retVal = 1;
|
||||
bool resB = cmSystemTools::RunSingleCommand(
|
||||
@ -619,10 +630,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
<< "# Directory: " << installDirectory << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Problem running install command: "
|
||||
<< buildCommand << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running install command: "
|
||||
<< buildCommand << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -636,8 +648,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
std::string tempInstallDirectory = baseTempInstallDirectory;
|
||||
installComponent = component;
|
||||
if (componentInstall) {
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install component: "
|
||||
<< installComponent << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Install component: " << installComponent
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
cmake cm(cmake::RoleScript);
|
||||
@ -733,8 +746,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
*/
|
||||
cmSystemTools::PutEnv(std::string("DESTDIR=") +
|
||||
tempInstallDirectory);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Creating directory: '"
|
||||
<< dir << "'" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"- Creating directory: '" << dir << "'" << std::endl);
|
||||
|
||||
if (!cmsys::SystemTools::MakeDirectory(dir, default_dir_mode)) {
|
||||
cmCPackLogger(
|
||||
@ -840,7 +853,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||
localFileName =
|
||||
localFileName.substr(localFileName.find_first_not_of('/'));
|
||||
Components[installComponent].Files.push_back(localFileName);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Adding file <"
|
||||
<< localFileName << "> to component <"
|
||||
<< installComponent << ">" << std::endl);
|
||||
}
|
||||
@ -912,16 +926,16 @@ void cmCPackGenerator::SetOption(const std::string& op, const char* value)
|
||||
this->MakefileMap->RemoveDefinition(op);
|
||||
return;
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, this->GetNameOfClass()
|
||||
<< "::SetOption(" << op << ", " << value << ")"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
this->GetNameOfClass() << "::SetOption(" << op << ", " << value
|
||||
<< ")" << std::endl);
|
||||
this->MakefileMap->AddDefinition(op, value);
|
||||
}
|
||||
|
||||
int cmCPackGenerator::DoPackage()
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package using " << this->Name
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"Create package using " << this->Name << std::endl);
|
||||
|
||||
// Prepare CPack internal name and check
|
||||
// values for many CPACK_xxx vars
|
||||
@ -939,8 +953,9 @@ int cmCPackGenerator::DoPackage()
|
||||
const char* toplevelDirectory =
|
||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||
if (cmSystemTools::FileExists(toplevelDirectory)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: "
|
||||
<< toplevelDirectory << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Remove toplevel directory: " << toplevelDirectory
|
||||
<< std::endl);
|
||||
if (!cmSystemTools::RepeatedRemoveDirectory(toplevelDirectory)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem removing toplevel directory: "
|
||||
@ -949,8 +964,8 @@ int cmCPackGenerator::DoPackage()
|
||||
}
|
||||
}
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "About to install project "
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"About to install project " << std::endl);
|
||||
|
||||
if (!this->InstallProject()) {
|
||||
return 0;
|
||||
@ -975,12 +990,13 @@ int cmCPackGenerator::DoPackage()
|
||||
}
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Package files to: "
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Package files to: "
|
||||
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
|
||||
<< std::endl);
|
||||
if (cmSystemTools::FileExists(tempPackageFileName)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Remove old package file" << std::endl);
|
||||
cmSystemTools::RemoveFile(tempPackageFileName);
|
||||
}
|
||||
if (cmSystemTools::IsOn(
|
||||
@ -1006,8 +1022,8 @@ int cmCPackGenerator::DoPackage()
|
||||
std::string());
|
||||
|
||||
if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem compressing the directory" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -1022,8 +1038,9 @@ int cmCPackGenerator::DoPackage()
|
||||
* - the initially provided name may have changed
|
||||
* (because the specific generator did 'normalize' it)
|
||||
*/
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Copying final package(s) ["
|
||||
<< packageFileNames.size() << "]:" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Copying final package(s) [" << packageFileNames.size()
|
||||
<< "]:" << std::endl);
|
||||
/* now copy package one by one */
|
||||
for (std::string const& pkgFileName : packageFileNames) {
|
||||
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
|
||||
@ -1031,20 +1048,23 @@ int cmCPackGenerator::DoPackage()
|
||||
tempPackageFileName = pkgFileName.c_str();
|
||||
tmpPF += "/" + filename;
|
||||
const char* packageFileName = tmpPF.c_str();
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy final package(s): "
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Copy final package(s): "
|
||||
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
|
||||
<< " to " << (packageFileName ? packageFileName : "(NULL)")
|
||||
<< std::endl);
|
||||
if (!cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
|
||||
packageFileName)) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Problem copying the package: "
|
||||
cmCPackLog::LOG_ERROR,
|
||||
"Problem copying the package: "
|
||||
<< (tempPackageFileName ? tempPackageFileName : "(NULL)") << " to "
|
||||
<< (packageFileName ? packageFileName : "(NULL)") << std::endl);
|
||||
return 0;
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- package: "
|
||||
<< packageFileName << " generated." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- package: " << packageFileName << " generated."
|
||||
<< std::endl);
|
||||
|
||||
/* Generate checksum file */
|
||||
if (crypto) {
|
||||
@ -1053,13 +1073,15 @@ int cmCPackGenerator::DoPackage()
|
||||
hashFile += "." + cmSystemTools::LowerCase(algo);
|
||||
cmsys::ofstream outF(hashFile.c_str());
|
||||
if (!outF) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create checksum file: "
|
||||
<< hashFile << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot create checksum file: " << hashFile
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
outF << crypto->HashFile(packageFileName) << " " << filename << "\n";
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- checksum file: "
|
||||
<< hashFile << " generated." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- checksum file: " << hashFile << " generated."
|
||||
<< std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1179,7 +1201,8 @@ const char* cmCPackGenerator::GetInstallPath()
|
||||
|
||||
const char* cmCPackGenerator::GetPackagingInstallPrefix()
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "GetPackagingInstallPrefix: '"
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"GetPackagingInstallPrefix: '"
|
||||
<< this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'"
|
||||
<< std::endl);
|
||||
|
||||
@ -1188,11 +1211,12 @@ const char* cmCPackGenerator::GetPackagingInstallPrefix()
|
||||
|
||||
std::string cmCPackGenerator::FindTemplate(const char* name)
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
|
||||
<< (name ? name : "(NULL)") << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Look for template: " << (name ? name : "(NULL)")
|
||||
<< std::endl);
|
||||
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: " << ffile
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Found template: " << ffile << std::endl);
|
||||
return ffile;
|
||||
}
|
||||
|
||||
@ -1260,10 +1284,10 @@ int cmCPackGenerator::PrepareGroupingKind()
|
||||
}
|
||||
|
||||
if (!groupingType.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
|
||||
<< this->Name << "]"
|
||||
<< " requested component grouping = " << groupingType
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"[" << this->Name << "]"
|
||||
<< " requested component grouping = " << groupingType
|
||||
<< std::endl);
|
||||
if (groupingType == "ALL_COMPONENTS_IN_ONE") {
|
||||
method = ONE_PACKAGE;
|
||||
} else if (groupingType == "IGNORE") {
|
||||
@ -1272,11 +1296,11 @@ int cmCPackGenerator::PrepareGroupingKind()
|
||||
method = ONE_PACKAGE_PER_GROUP;
|
||||
} else {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_WARNING, "["
|
||||
<< this->Name << "]"
|
||||
<< " requested component grouping type <" << groupingType
|
||||
<< "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
|
||||
<< std::endl);
|
||||
cmCPackLog::LOG_WARNING,
|
||||
"[" << this->Name << "]"
|
||||
<< " requested component grouping type <" << groupingType
|
||||
<< "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
|
||||
<< std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1290,11 +1314,11 @@ int cmCPackGenerator::PrepareGroupingKind()
|
||||
method = ONE_PACKAGE_PER_COMPONENT;
|
||||
}
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_WARNING, "["
|
||||
<< this->Name << "]"
|
||||
<< " One package per component group requested, "
|
||||
<< "but NO component groups exist: Ignoring component group."
|
||||
<< std::endl);
|
||||
cmCPackLog::LOG_WARNING,
|
||||
"[" << this->Name << "]"
|
||||
<< " One package per component group requested, "
|
||||
<< "but NO component groups exist: Ignoring component group."
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
// if user specified packaging method, override the default packaging method
|
||||
@ -1305,10 +1329,10 @@ int cmCPackGenerator::PrepareGroupingKind()
|
||||
const char* method_names[] = { "ALL_COMPONENTS_IN_ONE", "IGNORE_GROUPS",
|
||||
"ONE_PER_GROUP" };
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
|
||||
<< this->Name << "]"
|
||||
<< " requested component grouping = "
|
||||
<< method_names[componentPackageMethod] << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"[" << this->Name << "]"
|
||||
<< " requested component grouping = "
|
||||
<< method_names[componentPackageMethod] << std::endl);
|
||||
|
||||
return 1;
|
||||
}
|
||||
@ -1371,7 +1395,8 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
|
||||
|
||||
bool cmCPackGenerator::WantsComponentInstallation() const
|
||||
{
|
||||
return (!IsOn("CPACK_MONOLITHIC_INSTALL") && SupportsComponentInstallation()
|
||||
return (!IsOn("CPACK_MONOLITHIC_INSTALL") &&
|
||||
SupportsComponentInstallation()
|
||||
// check that we have at least one group or component
|
||||
&& (!this->ComponentGroups.empty() || !this->Components.empty()));
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCPack7zGenerator.h"
|
||||
#ifdef HAVE_FREEBSD_PKG
|
||||
#include "cmCPackFreeBSDGenerator.h"
|
||||
# include "cmCPackFreeBSDGenerator.h"
|
||||
#endif
|
||||
#include "cmCPackDebGenerator.h"
|
||||
#include "cmCPackGenerator.h"
|
||||
@ -24,25 +24,25 @@
|
||||
#include "cmCPackZIPGenerator.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include "cmCPackBundleGenerator.h"
|
||||
#include "cmCPackDragNDropGenerator.h"
|
||||
#include "cmCPackOSXX11Generator.h"
|
||||
#include "cmCPackPackageMakerGenerator.h"
|
||||
#include "cmCPackProductBuildGenerator.h"
|
||||
# include "cmCPackBundleGenerator.h"
|
||||
# include "cmCPackDragNDropGenerator.h"
|
||||
# include "cmCPackOSXX11Generator.h"
|
||||
# include "cmCPackPackageMakerGenerator.h"
|
||||
# include "cmCPackProductBuildGenerator.h"
|
||||
#endif
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
#include "cmCPackCygwinBinaryGenerator.h"
|
||||
#include "cmCPackCygwinSourceGenerator.h"
|
||||
# include "cmCPackCygwinBinaryGenerator.h"
|
||||
# include "cmCPackCygwinSourceGenerator.h"
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \
|
||||
!defined(__HAIKU__)
|
||||
#include "cmCPackRPMGenerator.h"
|
||||
# include "cmCPackRPMGenerator.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_LIBUUID))
|
||||
#include "WiX/cmCPackWIXGenerator.h"
|
||||
# include "WiX/cmCPackWIXGenerator.h"
|
||||
#endif
|
||||
|
||||
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
|
||||
|
@ -20,9 +20,9 @@
|
||||
|
||||
/* NSIS uses different command line syntax on Windows and others */
|
||||
#ifdef _WIN32
|
||||
#define NSIS_OPT "/"
|
||||
# define NSIS_OPT "/"
|
||||
#else
|
||||
#define NSIS_OPT "-"
|
||||
# define NSIS_OPT "-"
|
||||
#endif
|
||||
|
||||
cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
|
||||
@ -81,8 +81,8 @@ int cmCPackNSISGenerator::PackageFiles()
|
||||
|
||||
str << " Delete \"" << outputDir << "\\" << fileN << "\"" << std::endl;
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " << str.str()
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Uninstall Files: " << str.str() << std::endl);
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
|
||||
std::vector<std::string> dirs;
|
||||
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
||||
@ -117,12 +117,13 @@ int cmCPackNSISGenerator::PackageFiles()
|
||||
this->Components[componentName].Directories.push_back(std::move(fileN));
|
||||
}
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " << dstr.str()
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Uninstall Dirs: " << dstr.str() << std::endl);
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str());
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
||||
<< nsisInFileName << " to " << nsisFileName << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Configure file: " << nsisInFileName << " to " << nsisFileName
|
||||
<< std::endl);
|
||||
if (this->IsSet("CPACK_NSIS_MUI_ICON") ||
|
||||
this->IsSet("CPACK_NSIS_MUI_UNIICON")) {
|
||||
std::string installerIconCode;
|
||||
@ -308,10 +309,11 @@ int cmCPackNSISGenerator::PackageFiles()
|
||||
ofs << "# Run command: " << nsisCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
|
||||
<< nsisCmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running NSIS command: " << nsisCmd << std::endl
|
||||
<< "Please check "
|
||||
<< tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@ -329,28 +331,31 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", nullptr);
|
||||
}
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"cmCPackNSISGenerator::Initialize()" << std::endl);
|
||||
std::vector<std::string> path;
|
||||
std::string nsisPath;
|
||||
bool gotRegValue = false;
|
||||
|
||||
#ifdef _WIN32
|
||||
if (Nsis64) {
|
||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
|
||||
nsisPath, cmsys::SystemTools::KeyWOW64_64)) {
|
||||
if (!gotRegValue &&
|
||||
cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_64)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_64)) {
|
||||
if (!gotRegValue &&
|
||||
cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_64)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
}
|
||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
|
||||
nsisPath, cmsys::SystemTools::KeyWOW64_32)) {
|
||||
if (!gotRegValue &&
|
||||
cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_32)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
if (!gotRegValue &&
|
||||
@ -358,13 +363,15 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_32)) {
|
||||
if (!gotRegValue &&
|
||||
cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||
cmsys::SystemTools::KeyWOW64_32)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
|
||||
if (!gotRegValue &&
|
||||
cmsys::SystemTools::ReadRegistryValue(
|
||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
|
||||
gotRegValue = true;
|
||||
}
|
||||
|
||||
@ -395,8 +402,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
}
|
||||
|
||||
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: " << nsisCmd
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Test NSIS version: " << nsisCmd << std::endl);
|
||||
std::string output;
|
||||
int retVal = 1;
|
||||
bool resS = cmSystemTools::RunSingleCommand(
|
||||
@ -413,17 +420,18 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
ofs << "# Run command: " << nsisCmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Problem checking NSIS version with command: "
|
||||
<< nsisCmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem checking NSIS version with command: "
|
||||
<< nsisCmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
if (versionRex.find(output)) {
|
||||
double nsisVersion = atof(versionRex.match(1).c_str());
|
||||
double minNSISVersion = 2.09;
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " << nsisVersion
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"NSIS Version: " << nsisVersion << std::endl);
|
||||
if (nsisVersion < minNSISVersion) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPack requires NSIS Version 2.09 or greater. "
|
||||
@ -434,8 +442,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
}
|
||||
if (versionRexCVS.find(output)) {
|
||||
// No version check for NSIS cvs build
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
|
||||
<< versionRexCVS.match(1) << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"NSIS Version: CVS " << versionRexCVS.match(1) << std::endl);
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
|
||||
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
||||
@ -447,8 +455,9 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY");
|
||||
std::vector<std::string> cpackPackageDesktopLinksVector;
|
||||
if (cpackPackageDeskTopLinks) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
|
||||
<< cpackPackageDeskTopLinks << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"CPACK_CREATE_DESKTOP_LINKS: " << cpackPackageDeskTopLinks
|
||||
<< std::endl);
|
||||
|
||||
cmSystemTools::ExpandListArgument(cpackPackageDeskTopLinks,
|
||||
cpackPackageDesktopLinksVector);
|
||||
@ -457,7 +466,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
"CPACK_CREATE_DESKTOP_LINKS: " << cpdl << std::endl);
|
||||
}
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"CPACK_CREATE_DESKTOP_LINKS: "
|
||||
<< "not set" << std::endl);
|
||||
}
|
||||
|
||||
@ -465,8 +475,9 @@ int cmCPackNSISGenerator::InitializeInternal()
|
||||
std::ostringstream deleteStr;
|
||||
|
||||
if (cpackPackageExecutables) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
|
||||
<< cpackPackageExecutables << "." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"The cpackPackageExecutables: " << cpackPackageExecutables
|
||||
<< "." << std::endl);
|
||||
std::vector<std::string> cpackPackageExecutablesVector;
|
||||
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
|
||||
cpackPackageExecutablesVector);
|
||||
@ -683,8 +694,9 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
||||
<< std::endl);
|
||||
if (cmSystemTools::FileExists(archiveFile, true)) {
|
||||
if (!cmSystemTools::RemoveFile(archiveFile)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to remove archive file "
|
||||
<< archiveFile << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Unable to remove archive file " << archiveFile
|
||||
<< std::endl);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -694,8 +706,8 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
||||
this->ReadListFile("CPackZIP.cmake");
|
||||
|
||||
if (!this->IsSet("ZIP_EXECUTABLE")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to find ZIP program"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Unable to find ZIP program" << std::endl);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -746,10 +758,11 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
||||
ofs << "# Run command: " << cmd << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
|
||||
<< cmd << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running zip command: " << cmd << std::endl
|
||||
<< "Please check "
|
||||
<< tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,8 @@ void cmCPackNuGetGenerator::SetupGroupComponentVariables(bool ignoreGroup)
|
||||
// Does the component belong to a group?
|
||||
if (comp.second.Group == nullptr) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
||||
cmCPackLog::LOG_VERBOSE,
|
||||
"Component <"
|
||||
<< comp.second.Name
|
||||
<< "> does not belong to any group, package it separately."
|
||||
<< std::endl);
|
||||
|
@ -27,8 +27,9 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
const char* cpackPackageExecutables =
|
||||
this->GetOption("CPACK_PACKAGE_EXECUTABLES");
|
||||
if (cpackPackageExecutables) {
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
|
||||
<< cpackPackageExecutables << "." << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"The cpackPackageExecutables: " << cpackPackageExecutables
|
||||
<< "." << std::endl);
|
||||
std::ostringstream str;
|
||||
std::ostringstream deleteStr;
|
||||
std::vector<std::string> cpackPackageExecutablesVector;
|
||||
@ -78,7 +79,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
if (iconFile) {
|
||||
std::string iconFileName = cmsys::SystemTools::GetFilenameName(iconFile);
|
||||
if (!cmSystemTools::FileExists(iconFile)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find icon file: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find icon file: "
|
||||
<< iconFile
|
||||
<< ". Please check CPACK_PACKAGE_ICON setting."
|
||||
<< std::endl);
|
||||
@ -109,8 +111,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
!this->CopyResourcePlistFile("OSXScriptLauncher", appdir,
|
||||
this->GetOption("CPACK_PACKAGE_FILE_NAME"),
|
||||
true)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem copying the resource files" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -147,8 +149,9 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
|
||||
<< "\" create -ov -fs HFS+ -format UDZO -srcfolder \""
|
||||
<< diskImageDirectory << "\" \"" << packageFileNames[0] << "\"";
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress disk image using command: "
|
||||
<< dmgCmd.str() << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Compress disk image using command: " << dmgCmd.str()
|
||||
<< std::endl);
|
||||
// since we get random dashboard failures with this one
|
||||
// try running it more than once
|
||||
int retVal = 1;
|
||||
@ -170,7 +173,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running hdiutil command: "
|
||||
<< dmgCmd.str() << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
@ -182,13 +186,13 @@ int cmCPackOSXX11Generator::PackageFiles()
|
||||
|
||||
int cmCPackOSXX11Generator::InitializeInternal()
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackOSXX11Generator::Initialize()"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"cmCPackOSXX11Generator::Initialize()" << std::endl);
|
||||
std::vector<std::string> path;
|
||||
std::string pkgPath = cmSystemTools::FindProgram("hdiutil", path, false);
|
||||
if (pkgPath.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find hdiutil compiler" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
||||
@ -263,8 +267,9 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(
|
||||
destFileName += "/";
|
||||
destFileName += outputFileName;
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
||||
<< inFileName << " to " << destFileName << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Configure file: " << inFileName << " to " << destFileName
|
||||
<< std::endl);
|
||||
this->ConfigureFile(inFileName.c_str(), destFileName.c_str(), copyOnly);
|
||||
return true;
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ bool cmCPackPKGGenerator::SupportsComponentInstallation() const
|
||||
|
||||
int cmCPackPKGGenerator::InitializeInternal()
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackPKGGenerator::Initialize()"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"cmCPackPKGGenerator::Initialize()" << std::endl);
|
||||
|
||||
return this->Superclass::InitializeInternal();
|
||||
}
|
||||
@ -52,8 +52,9 @@ void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
|
||||
std::string distributionTemplate =
|
||||
this->FindTemplate("CPack.distribution.dist.in");
|
||||
if (distributionTemplate.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find input file: "
|
||||
<< distributionTemplate << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find input file: " << distributionTemplate
|
||||
<< std::endl);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -270,23 +271,26 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
|
||||
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
|
||||
const char* inFileName = this->GetOption(cpackVar);
|
||||
if (!inFileName) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: "
|
||||
<< cpackVar.c_str()
|
||||
<< " not specified. It should point to "
|
||||
<< (!name.empty() ? name : "<empty>") << ".rtf, " << name
|
||||
<< ".html, or " << name << ".txt file" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPack option: " << cpackVar.c_str()
|
||||
<< " not specified. It should point to "
|
||||
<< (!name.empty() ? name : "<empty>")
|
||||
<< ".rtf, " << name << ".html, or " << name
|
||||
<< ".txt file" << std::endl);
|
||||
return false;
|
||||
}
|
||||
if (!cmSystemTools::FileExists(inFileName)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find "
|
||||
<< (!name.empty() ? name : "<empty>")
|
||||
<< " resource file: " << inFileName << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find " << (!name.empty() ? name : "<empty>")
|
||||
<< " resource file: " << inFileName
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName);
|
||||
if (ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt") {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Bad file extension specified: "
|
||||
cmCPackLog::LOG_ERROR,
|
||||
"Bad file extension specified: "
|
||||
<< ext
|
||||
<< ". Currently only .rtfd, .rtf, .html, and .txt files allowed."
|
||||
<< std::endl);
|
||||
@ -330,8 +334,9 @@ bool cmCPackPKGGenerator::CopyResourcePlistFile(const std::string& name,
|
||||
destFileName += "/";
|
||||
destFileName += outName;
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
||||
<< inFileName << " to " << destFileName << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Configure file: " << inFileName << " to " << destFileName
|
||||
<< std::endl);
|
||||
this->ConfigureFile(inFileName.c_str(), destFileName.c_str());
|
||||
return true;
|
||||
}
|
||||
|
@ -251,8 +251,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
||||
!this->CopyCreateResourceFile("Welcome", resDir) ||
|
||||
!this->CopyResourcePlistFile("Info.plist") ||
|
||||
!this->CopyResourcePlistFile("Description.plist")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem copying the resource files" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -311,7 +311,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
||||
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: "
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running hdiutil command: "
|
||||
<< dmgCmd.str() << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
@ -357,8 +358,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
||||
} else {
|
||||
pkgPath = cmSystemTools::FindProgram("PackageMaker", paths, false);
|
||||
if (pkgPath.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find PackageMaker compiler"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find PackageMaker compiler" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str());
|
||||
@ -415,12 +416,13 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
||||
}
|
||||
this->PackageMakerVersion = atof(rexVersion.match(1).c_str());
|
||||
if (this->PackageMakerVersion < 1.0) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Require PackageMaker 1.0 or higher"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Require PackageMaker 1.0 or higher" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: "
|
||||
<< this->PackageMakerVersion << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"PackageMaker version is: " << this->PackageMakerVersion
|
||||
<< std::endl);
|
||||
|
||||
// Determine the package compatibility version. If it wasn't
|
||||
// specified by the user, we define it based on which features the
|
||||
@ -448,8 +450,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
||||
std::vector<std::string> no_paths;
|
||||
pkgPath = cmSystemTools::FindProgram("hdiutil", no_paths, false);
|
||||
if (pkgPath.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find hdiutil compiler" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
||||
@ -470,17 +472,18 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char* command,
|
||||
bool res = cmSystemTools::RunSingleCommand(
|
||||
command, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
|
||||
cmDuration::zero());
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Done running package maker" << std::endl);
|
||||
if (!res || retVal) {
|
||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||
ofs << "# Run command: " << command << std::endl
|
||||
<< "# Output:" << std::endl
|
||||
<< output << std::endl;
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "Problem running PackageMaker command: "
|
||||
<< command << std::endl
|
||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem running PackageMaker command: "
|
||||
<< command << std::endl
|
||||
<< "Please check " << tmpFile << " for errors"
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
// sometimes the command finishes but the directory is not yet
|
||||
@ -505,8 +508,9 @@ bool cmCPackPackageMakerGenerator::GenerateComponentPackage(
|
||||
const char* packageFile, const char* packageDir,
|
||||
const cmCPackComponent& component)
|
||||
{
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
||||
<< packageFile << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Building component package: " << packageFile
|
||||
<< std::endl);
|
||||
|
||||
// The command that will be used to run PackageMaker
|
||||
std::ostringstream pkgCmd;
|
||||
|
@ -67,8 +67,8 @@ int cmCPackProductBuildGenerator::PackageFiles()
|
||||
this->GetOption("CPACK_PRODUCTBUILD_RESOURCES_DIR");
|
||||
|
||||
if (!cmSystemTools::CopyADirectory(userResDir, resDir)) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Problem copying the resource files" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -121,16 +121,16 @@ int cmCPackProductBuildGenerator::InitializeInternal()
|
||||
std::string program =
|
||||
cmSystemTools::FindProgram("pkgbuild", no_paths, false);
|
||||
if (program.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find pkgbuild executable"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find pkgbuild executable" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program.c_str());
|
||||
|
||||
program = cmSystemTools::FindProgram("productbuild", no_paths, false);
|
||||
if (program.empty()) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find productbuild executable"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Cannot find productbuild executable" << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program.c_str());
|
||||
@ -172,8 +172,9 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
|
||||
packageFile += '/';
|
||||
packageFile += packageFileName;
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
||||
<< packageFile << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||
"- Building component package: " << packageFile
|
||||
<< std::endl);
|
||||
|
||||
const char* comp_name = component ? component->Name.c_str() : nullptr;
|
||||
|
||||
|
@ -90,8 +90,8 @@ int cmCPackRPMGenerator::PackageOnePack(std::string const& initialToplevel,
|
||||
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH",
|
||||
component_path.c_str());
|
||||
if (!this->ReadListFile("CPackRPM.cmake")) {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error while execution CPackRPM.cmake" << std::endl);
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
@ -165,7 +165,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
}
|
||||
|
||||
if (shouldSet) {
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Setting "
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Setting "
|
||||
<< "CPACK_RPM_DEBUGINFO_PACKAGE because "
|
||||
<< "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but "
|
||||
<< " none of the "
|
||||
@ -203,8 +204,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
continue;
|
||||
}
|
||||
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
|
||||
<< compGIt->first << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Packaging component group: " << compGIt->first
|
||||
<< std::endl);
|
||||
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
||||
}
|
||||
// Handle Orphan components (components not belonging to any groups)
|
||||
@ -226,7 +228,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
}
|
||||
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
||||
cmCPackLog::LOG_VERBOSE,
|
||||
"Component <"
|
||||
<< compIt->second.Name
|
||||
<< "> does not belong to any group, package it separately."
|
||||
<< std::endl);
|
||||
@ -242,7 +245,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
} else if (mainCompIt != this->Components.end()) {
|
||||
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_RPM_MAIN_COMPONENT set"
|
||||
<< " to non existing component.\n");
|
||||
retval = 0;
|
||||
}
|
||||
@ -276,7 +280,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
if (mainCompIt != this->Components.end()) {
|
||||
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"CPACK_RPM_MAIN_COMPONENT set"
|
||||
<< " to non existing component.\n");
|
||||
retval = 0;
|
||||
}
|
||||
@ -290,8 +295,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
|
||||
for (compGIt = this->ComponentGroups.begin();
|
||||
compGIt != this->ComponentGroups.end(); ++compGIt) {
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
|
||||
<< compGIt->first << std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||
"Packaging component group: " << compGIt->first
|
||||
<< std::endl);
|
||||
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
||||
}
|
||||
// Handle Orphan components (components not belonging to any groups)
|
||||
@ -301,7 +307,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
// Does the component belong to a group?
|
||||
if (compIt->second.Group == nullptr) {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
||||
cmCPackLog::LOG_VERBOSE,
|
||||
"Component <"
|
||||
<< compIt->second.Name
|
||||
<< "> does not belong to any group, package it separately."
|
||||
<< std::endl);
|
||||
@ -320,7 +327,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
||||
}
|
||||
} else {
|
||||
cmCPackLogger(
|
||||
cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT not set but"
|
||||
cmCPackLog::LOG_ERROR,
|
||||
"CPACK_RPM_MAIN_COMPONENT not set but"
|
||||
<< " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"
|
||||
<< " being set.\n");
|
||||
retval = 0;
|
||||
@ -380,8 +388,8 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne(
|
||||
if (this->ReadListFile("CPackRPM.cmake")) {
|
||||
AddGeneratedPackageNames();
|
||||
} else {
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||
"Error while execution CPackRPM.cmake" << std::endl);
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ int cmCPackSTGZGenerator::PackageFiles()
|
||||
S_IRGRP | S_IWGRP | S_IXGRP |
|
||||
S_IROTH | S_IWOTH | S_IXOTH
|
||||
#endif
|
||||
);
|
||||
);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
@ -100,8 +100,8 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
|
||||
++ptr;
|
||||
}
|
||||
counter++;
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Number of lines: " << counter
|
||||
<< std::endl);
|
||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||
"Number of lines: " << counter << std::endl);
|
||||
char buffer[1024];
|
||||
sprintf(buffer, "%d", counter);
|
||||
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <vector>
|
||||
|
||||
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include "cmsys/ConsoleBuf.hxx"
|
||||
# include "cmsys/ConsoleBuf.hxx"
|
||||
#endif
|
||||
|
||||
#include "cmCPackGenerator.h"
|
||||
@ -82,8 +82,9 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
|
||||
std::string key = value.substr(0, pos);
|
||||
value = value.c_str() + pos + 1;
|
||||
def->Map[key] = value;
|
||||
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
|
||||
<< key << " to \"" << value << "\"" << std::endl);
|
||||
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG,
|
||||
"Set CPack variable: " << key << " to \"" << value << "\""
|
||||
<< std::endl);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -320,8 +321,8 @@ int main(int argc, char const* const* argv)
|
||||
}
|
||||
const char* genList = globalMF.GetDefinition("CPACK_GENERATOR");
|
||||
if (!genList) {
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "CPack generator not specified"
|
||||
<< std::endl);
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||
"CPack generator not specified" << std::endl);
|
||||
} else {
|
||||
std::vector<std::string> generatorsVector;
|
||||
cmSystemTools::ExpandListArgument(genList, generatorsVector);
|
||||
@ -384,8 +385,9 @@ int main(int argc, char const* const* argv)
|
||||
}
|
||||
if (parsed) {
|
||||
const char* projName = mf->GetDefinition("CPACK_PACKAGE_NAME");
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "Use generator: "
|
||||
<< cpackGenerator->GetNameOfClass() << std::endl);
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||
"Use generator: " << cpackGenerator->GetNameOfClass()
|
||||
<< std::endl);
|
||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||
"For project: " << projName << std::endl);
|
||||
|
||||
|
@ -155,8 +155,9 @@ bool cmCTestBZR::NoteOldRevision()
|
||||
{
|
||||
this->OldRevision = this->LoadInfo();
|
||||
this->Log << "Revision before update: " << this->OldRevision << "\n";
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
||||
<< this->OldRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Old revision of repository is: " << this->OldRevision
|
||||
<< "\n");
|
||||
this->PriorRev.Rev = this->OldRevision;
|
||||
return true;
|
||||
}
|
||||
@ -165,14 +166,16 @@ bool cmCTestBZR::NoteNewRevision()
|
||||
{
|
||||
this->NewRevision = this->LoadInfo();
|
||||
this->Log << "Revision after update: " << this->NewRevision << "\n";
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
||||
<< this->NewRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" New revision of repository is: " << this->NewRevision
|
||||
<< "\n");
|
||||
this->Log << "URL = " << this->URL << "\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
class cmCTestBZR::LogParser : public cmCTestVC::OutputLogger,
|
||||
private cmXMLParser
|
||||
class cmCTestBZR::LogParser
|
||||
: public cmCTestVC::OutputLogger
|
||||
, private cmXMLParser
|
||||
{
|
||||
public:
|
||||
LogParser(cmCTestBZR* bzr, const char* prefix)
|
||||
|
@ -299,7 +299,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
this->ErrorWarningFileLineRegex.push_back(std::move(r));
|
||||
} else {
|
||||
cmCTestLog(
|
||||
this->CTest, ERROR_MESSAGE, "Problem Compiling regular expression: "
|
||||
this->CTest, ERROR_MESSAGE,
|
||||
"Problem Compiling regular expression: "
|
||||
<< cmCTestWarningErrorFileLine[entry].RegularExpressionString
|
||||
<< std::endl);
|
||||
}
|
||||
@ -331,8 +332,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
cmGeneratedFileStream ofs;
|
||||
auto elapsed_time_start = std::chrono::steady_clock::now();
|
||||
if (!this->StartLogFile("Build", ofs)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build log file"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create build log file" << std::endl);
|
||||
}
|
||||
|
||||
// Create lists of regular expression strings for errors, error exceptions,
|
||||
@ -352,7 +353,7 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]);
|
||||
}
|
||||
|
||||
// Pre-compile regular expressions objects for all regular expressions
|
||||
// Pre-compile regular expressions objects for all regular expressions
|
||||
|
||||
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
|
||||
regexes.clear(); \
|
||||
@ -452,8 +453,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
// Generate XML output
|
||||
cmGeneratedFileStream xofs;
|
||||
if (!this->StartResultingXML(cmCTest::PartBuild, "Build", xofs)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build XML file"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create build XML file" << std::endl);
|
||||
return -1;
|
||||
}
|
||||
cmXMLWriter xml(xofs);
|
||||
@ -466,19 +467,20 @@ int cmCTestBuildHandler::ProcessHandler()
|
||||
this->GenerateXMLFooter(xml, elapsed_build_time);
|
||||
|
||||
if (res != cmsysProcess_State_Exited || retVal || this->TotalErrors > 0) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error(s) when building project"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error(s) when building project" << std::endl);
|
||||
}
|
||||
|
||||
// Display message about number of errors and warnings
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
|
||||
<< this->TotalErrors
|
||||
<< (this->TotalErrors >= this->MaxErrors ? " or more" : "")
|
||||
<< " Compiler errors" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
|
||||
<< this->TotalWarnings
|
||||
<< (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
|
||||
<< " Compiler warnings" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" " << this->TotalErrors
|
||||
<< (this->TotalErrors >= this->MaxErrors ? " or more" : "")
|
||||
<< " Compiler errors" << std::endl);
|
||||
cmCTestLog(
|
||||
this->CTest, HANDLER_OUTPUT,
|
||||
" " << this->TotalWarnings
|
||||
<< (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
|
||||
<< " Compiler warnings" << std::endl);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
@ -779,8 +781,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
}
|
||||
argv.push_back(nullptr);
|
||||
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Run command:", this->Quiet);
|
||||
for (char const* arg : argv) {
|
||||
if (!arg) {
|
||||
break;
|
||||
@ -812,7 +814,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
cmProcessOutput processOutput(encoding);
|
||||
std::string strdata;
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_PROGRESS_OUTPUT, " Each symbol represents "
|
||||
this->CTest, HANDLER_PROGRESS_OUTPUT,
|
||||
" Each symbol represents "
|
||||
<< tick_len << " bytes of output." << std::endl
|
||||
<< (this->UseCTestLaunch
|
||||
? ""
|
||||
@ -868,7 +871,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
&this->BuildProcessingQueue);
|
||||
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
|
||||
&this->BuildProcessingErrorQueue);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size of output: "
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT,
|
||||
" Size of output: "
|
||||
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
@ -921,8 +925,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
||||
errorwarning.Error = true;
|
||||
this->ErrorsAndWarnings.push_back(std::move(errorwarning));
|
||||
this->TotalErrors++;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: "
|
||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"There was an error: " << cmsysProcess_GetErrorString(cp)
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
cmsysProcess_Delete(cp);
|
||||
@ -1049,7 +1054,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
|
||||
this->LastTickChar, this->Quiet);
|
||||
tickDisplayed = true;
|
||||
if (tick % tick_line_len == 0 && tick > 0) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size: "
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT,
|
||||
" Size: "
|
||||
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
|
||||
<< std::endl
|
||||
<< " ",
|
||||
@ -1103,7 +1109,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
||||
for (cmsys::RegularExpression& rx : this->ErrorExceptionRegex) {
|
||||
if (rx.find(data)) {
|
||||
errorLine = 0;
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, " Not an error Line: "
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Not an error Line: "
|
||||
<< data << " (matches: "
|
||||
<< this->CustomErrorExceptions[wrxCnt] << ")"
|
||||
<< std::endl,
|
||||
@ -1119,7 +1126,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
||||
for (cmsys::RegularExpression& rx : this->WarningMatchRegex) {
|
||||
if (rx.find(data)) {
|
||||
warningLine = 1;
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, " Warning Line: "
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Warning Line: "
|
||||
<< data << " (matches: "
|
||||
<< this->CustomWarningMatches[wrxCnt] << ")"
|
||||
<< std::endl,
|
||||
@ -1134,7 +1142,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
||||
for (cmsys::RegularExpression& rx : this->WarningExceptionRegex) {
|
||||
if (rx.find(data)) {
|
||||
warningLine = 0;
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, " Not a warning Line: "
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
" Not a warning Line: "
|
||||
<< data << " (matches: "
|
||||
<< this->CustomWarningExceptions[wrxCnt] << ")"
|
||||
<< std::endl,
|
||||
|
@ -134,8 +134,9 @@ private:
|
||||
|
||||
bool ProcessLine() override
|
||||
{
|
||||
if (this->Line == ("======================================="
|
||||
"======================================")) {
|
||||
if (this->Line ==
|
||||
("======================================="
|
||||
"======================================")) {
|
||||
// This line ends the revision list.
|
||||
if (this->Section == SectionRevisions) {
|
||||
this->FinishRevision();
|
||||
|
@ -51,8 +51,8 @@ int cmCTestConfigureHandler::ProcessHandler()
|
||||
if (!this->CTest->GetShowOnly()) {
|
||||
cmGeneratedFileStream os;
|
||||
if (!this->StartResultingXML(cmCTest::PartConfigure, "Configure", os)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open configure file"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open configure file" << std::endl);
|
||||
return 1;
|
||||
}
|
||||
std::string start_time = this->CTest->CurrentTime();
|
||||
|
@ -197,10 +197,10 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file,
|
||||
|
||||
for (cmsys::RegularExpression& rx : this->CustomCoverageExcludeRegex) {
|
||||
if (rx.find(file)) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File "
|
||||
<< file << " is excluded in CTestCustom.ctest"
|
||||
<< std::endl;
|
||||
, this->Quiet);
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" File " << file << " is excluded in CTestCustom.ctest" << std::endl;
|
||||
, this->Quiet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -391,8 +391,8 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||
|
||||
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
||||
covSumFile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open coverage summary file." << std::endl);
|
||||
return -1;
|
||||
}
|
||||
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
|
||||
@ -429,9 +429,10 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||
this->Quiet);
|
||||
file_count++;
|
||||
if (file_count % 50 == 0) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " processed: "
|
||||
<< file_count << " out of "
|
||||
<< cont.TotalCoverage.size() << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" processed: " << file_count << " out of "
|
||||
<< cont.TotalCoverage.size()
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||
}
|
||||
@ -524,8 +525,9 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||
float cper = 0;
|
||||
float cmet = 0;
|
||||
if (tested + untested > 0) {
|
||||
cper = (100 * SAFEDIV(static_cast<float>(tested),
|
||||
static_cast<float>(tested + untested)));
|
||||
cper = (100 *
|
||||
SAFEDIV(static_cast<float>(tested),
|
||||
static_cast<float>(tested + untested)));
|
||||
cmet = (SAFEDIV(static_cast<float>(tested + 10),
|
||||
static_cast<float>(tested + untested + 10)));
|
||||
}
|
||||
@ -629,14 +631,14 @@ int cmCTestCoverageHandler::ProcessHandler()
|
||||
covSumXML.EndElement(); // Coverage
|
||||
this->CTest->EndXML(covSumXML);
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, ""
|
||||
<< std::endl
|
||||
<< "\tCovered LOC: " << total_tested << std::endl
|
||||
<< "\tNot covered LOC: " << total_untested << std::endl
|
||||
<< "\tTotal LOC: " << total_lines << std::endl
|
||||
<< "\tPercentage Coverage: "
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(2)
|
||||
<< (percent_coverage) << "%" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
"" << std::endl
|
||||
<< "\tCovered LOC: " << total_tested << std::endl
|
||||
<< "\tNot covered LOC: " << total_untested << std::endl
|
||||
<< "\tTotal LOC: " << total_lines << std::endl
|
||||
<< "\tPercentage Coverage: "
|
||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(2)
|
||||
<< (percent_coverage) << "%" << std::endl);
|
||||
|
||||
ofs << "\tCovered LOC: " << total_tested << std::endl
|
||||
<< "\tNot covered LOC: " << total_untested << std::endl
|
||||
@ -677,9 +679,9 @@ void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile* mf)
|
||||
// Compare file names: fnc(fn1) == fnc(fn2) // fnc == file name compare
|
||||
//
|
||||
#ifdef _WIN32
|
||||
#define fnc(s) cmSystemTools::LowerCase(s)
|
||||
# define fnc(s) cmSystemTools::LowerCase(s)
|
||||
#else
|
||||
#define fnc(s) s
|
||||
# define fnc(s) s
|
||||
#endif
|
||||
|
||||
bool IsFileInDir(const std::string& infile, const std::string& indir)
|
||||
@ -1045,7 +1047,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
continue;
|
||||
}
|
||||
if (retVal != 0) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Coverage command returned: "
|
||||
<< retVal << " while processing: " << f << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Command produced error: " << cont->Error << std::endl);
|
||||
@ -1077,8 +1080,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 1;
|
||||
}
|
||||
if (gcovStyle != 1) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e1"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e1" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1090,8 +1093,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 1;
|
||||
}
|
||||
if (gcovStyle != 1) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e2"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e2" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1102,8 +1105,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e3"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e3" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1115,8 +1118,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e4"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e4" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1125,8 +1128,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e5"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e5" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1137,8 +1140,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e6"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e6" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
@ -1152,37 +1155,40 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e7"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e7" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this->CTest, WARNING, "Warning: Cannot open file: "
|
||||
<< st2re5.match(1) << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, WARNING,
|
||||
"Warning: Cannot open file: " << st2re5.match(1)
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
} else if (st2re6.find(line.c_str())) {
|
||||
if (gcovStyle == 0) {
|
||||
gcovStyle = 2;
|
||||
}
|
||||
if (gcovStyle != 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e8"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output style e8" << std::endl);
|
||||
cont->Error++;
|
||||
break;
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this->CTest, WARNING, "Warning: File: "
|
||||
<< st2re6.match(1) << " is newer than "
|
||||
<< st2re6.match(2) << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, WARNING,
|
||||
"Warning: File: " << st2re6.match(1)
|
||||
<< " is newer than "
|
||||
<< st2re6.match(2) << std::endl,
|
||||
this->Quiet);
|
||||
} else {
|
||||
// gcov 4.7 can have output lines saying "No executable lines" and
|
||||
// "Removing 'filename.gcov'"... Don't log those as "errors."
|
||||
if (line != "No executable lines" &&
|
||||
!cmSystemTools::StringStartsWith(line.c_str(), "Removing ")) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output line: ["
|
||||
<< line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown gcov output line: [" << line << "]"
|
||||
<< std::endl);
|
||||
cont->Error++;
|
||||
// abort();
|
||||
}
|
||||
@ -1418,7 +1424,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
||||
continue;
|
||||
}
|
||||
if (retVal != 0) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Coverage command returned: "
|
||||
<< retVal << " while processing: " << f << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Command produced error: " << cont->Error << std::endl);
|
||||
@ -1817,7 +1824,8 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
||||
"run covbr: " << std::endl, this->Quiet);
|
||||
|
||||
if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for."
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"error running covbr for."
|
||||
<< "\n");
|
||||
return -1;
|
||||
}
|
||||
@ -1981,8 +1989,8 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
||||
cmXMLWriter xml(covSumFile);
|
||||
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
||||
covSumFile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open coverage summary file." << std::endl);
|
||||
return 0;
|
||||
}
|
||||
this->CTest->StartXML(xml, this->AppendXML);
|
||||
@ -2198,7 +2206,8 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
||||
}
|
||||
// should be at the end now
|
||||
if (pos != std::string::npos) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error parsing input : "
|
||||
<< inputLine << " last pos not npos = " << pos << "\n");
|
||||
}
|
||||
return true;
|
||||
|
@ -175,7 +175,8 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
|
||||
"Curl debug: [" << curlDebug << "]\n", this->Quiet);
|
||||
}
|
||||
if (response.empty()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "No response from server.\n"
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"No response from server.\n"
|
||||
<< curlDebug);
|
||||
return false;
|
||||
}
|
||||
@ -186,7 +187,8 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
|
||||
std::string const& fields, std::string& response)
|
||||
{
|
||||
response.clear();
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, "HttpRequest\n"
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"HttpRequest\n"
|
||||
<< "url: " << url << "\n"
|
||||
<< "fields " << fields << "\n",
|
||||
this->Quiet);
|
||||
|
@ -70,8 +70,9 @@ std::string cmCTestGIT::GetWorkingRevision()
|
||||
bool cmCTestGIT::NoteOldRevision()
|
||||
{
|
||||
this->OldRevision = this->GetWorkingRevision();
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
||||
<< this->OldRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Old revision of repository is: " << this->OldRevision
|
||||
<< "\n");
|
||||
this->PriorRev.Rev = this->OldRevision;
|
||||
return true;
|
||||
}
|
||||
@ -79,8 +80,9 @@ bool cmCTestGIT::NoteOldRevision()
|
||||
bool cmCTestGIT::NoteNewRevision()
|
||||
{
|
||||
this->NewRevision = this->GetWorkingRevision();
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
||||
<< this->NewRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" New revision of repository is: " << this->NewRevision
|
||||
<< "\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -100,8 +100,9 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
|
||||
}
|
||||
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(),
|
||||
xofs, true)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create resulting XML file: "
|
||||
<< ostr.str() << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create resulting XML file: " << ostr.str()
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
this->CTest->AddSubmitFile(part, ostr.str().c_str());
|
||||
|
@ -107,8 +107,9 @@ std::string cmCTestHG::GetWorkingRevision()
|
||||
bool cmCTestHG::NoteOldRevision()
|
||||
{
|
||||
this->OldRevision = this->GetWorkingRevision();
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
||||
<< this->OldRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Old revision of repository is: " << this->OldRevision
|
||||
<< "\n");
|
||||
this->PriorRev.Rev = this->OldRevision;
|
||||
return true;
|
||||
}
|
||||
@ -116,8 +117,9 @@ bool cmCTestHG::NoteOldRevision()
|
||||
bool cmCTestHG::NoteNewRevision()
|
||||
{
|
||||
this->NewRevision = this->GetWorkingRevision();
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
||||
<< this->NewRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" New revision of repository is: " << this->NewRevision
|
||||
<< "\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -157,8 +159,9 @@ bool cmCTestHG::UpdateImpl()
|
||||
return this->RunUpdateCommand(&hg_update[0], &out, &err);
|
||||
}
|
||||
|
||||
class cmCTestHG::LogParser : public cmCTestVC::OutputLogger,
|
||||
private cmXMLParser
|
||||
class cmCTestHG::LogParser
|
||||
: public cmCTestVC::OutputLogger
|
||||
, private cmXMLParser
|
||||
{
|
||||
public:
|
||||
LogParser(cmCTestHG* hg, const char* prefix)
|
||||
@ -168,6 +171,7 @@ public:
|
||||
this->InitializeParser();
|
||||
}
|
||||
~LogParser() override { this->CleanupParser(); }
|
||||
|
||||
private:
|
||||
cmCTestHG* HG;
|
||||
|
||||
|
@ -158,13 +158,14 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
||||
"BuildDirectory", cmSystemTools::CollapseFullPath(bdir).c_str(),
|
||||
this->Quiet);
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CTEST_BINARY_DIRECTORY not set"
|
||||
<< std::endl;);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"CTEST_BINARY_DIRECTORY not set" << std::endl;);
|
||||
}
|
||||
}
|
||||
if (this->Values[ct_SOURCE]) {
|
||||
cmCTestLog(this->CTest, DEBUG, "Set source directory to: "
|
||||
<< this->Values[ct_SOURCE] << std::endl);
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"Set source directory to: " << this->Values[ct_SOURCE]
|
||||
<< std::endl);
|
||||
this->CTest->SetCTestConfiguration(
|
||||
"SourceDirectory",
|
||||
cmSystemTools::CollapseFullPath(this->Values[ct_SOURCE]).c_str(),
|
||||
@ -186,8 +187,9 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
||||
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
|
||||
cmCTestGenericHandler* handler = this->InitializeHandler();
|
||||
if (!handler) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot instantiate test handler "
|
||||
<< this->GetName() << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot instantiate test handler " << this->GetName()
|
||||
<< std::endl);
|
||||
if (capureCMakeError) {
|
||||
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
||||
"-1");
|
||||
@ -226,8 +228,8 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
||||
if (capureCMakeError) {
|
||||
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
||||
"-1");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, this->GetName()
|
||||
<< " " << this->GetError() << "\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
this->GetName() << " " << this->GetError() << "\n");
|
||||
// return success because failure is recorded in CAPTURE_CMAKE_ERROR
|
||||
return true;
|
||||
}
|
||||
@ -303,8 +305,8 @@ bool cmCTestHandlerCommand::CheckArgumentValue(std::string const& arg)
|
||||
return true;
|
||||
}
|
||||
this->Values[k] = arg.c_str();
|
||||
cmCTestLog(this->CTest, DEBUG, "Set " << this->Arguments[k] << " to "
|
||||
<< arg << "\n");
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"Set " << this->Arguments[k] << " to " << arg << "\n");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -21,9 +21,9 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <fcntl.h> // for _O_BINARY
|
||||
#include <io.h> // for _setmode
|
||||
#include <stdio.h> // for std{out,err} and fileno
|
||||
# include <fcntl.h> // for _O_BINARY
|
||||
# include <io.h> // for _setmode
|
||||
# include <stdio.h> // for std{out,err} and fileno
|
||||
#endif
|
||||
|
||||
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
|
||||
|
@ -37,8 +37,9 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
|
||||
static void xmlReportError(int line, const char* msg, void* data)
|
||||
{
|
||||
cmCTest* ctest = static_cast<cmCTest*>(data);
|
||||
cmCTestLog(ctest, ERROR_MESSAGE, "Error parsing XML in stream at line "
|
||||
<< line << ": " << msg << std::endl);
|
||||
cmCTestLog(ctest, ERROR_MESSAGE,
|
||||
"Error parsing XML in stream at line " << line << ": " << msg
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
// parse the xml file containing the results of last BoundsChecker run
|
||||
@ -366,10 +367,10 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
|
||||
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
|
||||
std::string outname = result.Name + " ";
|
||||
outname.resize(maxTestNameWidth + 4, '.');
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, cc + 1
|
||||
<< "/" << total << " MemCheck: #"
|
||||
<< result.TestCount << ": " << outname
|
||||
<< " Defects: " << memoryErrors << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
cc + 1 << "/" << total << " MemCheck: #"
|
||||
<< result.TestCount << ": " << outname
|
||||
<< " Defects: " << memoryErrors << std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
xml.StartElement("Log");
|
||||
@ -773,8 +774,9 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
|
||||
}
|
||||
}
|
||||
if (cc == this->ResultStrings.size()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown Purify memory fault: "
|
||||
<< pfW.match(1) << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unknown Purify memory fault: " << pfW.match(1)
|
||||
<< std::endl);
|
||||
ostr << "*** Unknown Purify memory fault: " << pfW.match(1)
|
||||
<< std::endl;
|
||||
}
|
||||
@ -918,11 +920,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
||||
break; // stop the copy of output if we are full
|
||||
}
|
||||
}
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "End test (elapsed: "
|
||||
<< cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
|
||||
<< "s)" << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"End test (elapsed: "
|
||||
<< cmDurationTo<unsigned int>(
|
||||
std::chrono::steady_clock::now() - sttime)
|
||||
<< "s)" << std::endl,
|
||||
this->Quiet);
|
||||
log = ostr.str();
|
||||
this->DefectCount += defects;
|
||||
return defects == 0;
|
||||
@ -963,11 +966,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
||||
results[err]++;
|
||||
defects++;
|
||||
}
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "End test (elapsed: "
|
||||
<< cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
|
||||
<< "s)" << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"End test (elapsed: "
|
||||
<< cmDurationTo<unsigned int>(
|
||||
std::chrono::steady_clock::now() - sttime)
|
||||
<< "s)" << std::endl,
|
||||
this->Quiet);
|
||||
if (defects) {
|
||||
// only put the output of Bounds Checker if there were
|
||||
// errors or leaks detected
|
||||
|
@ -124,8 +124,9 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
|
||||
std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
|
||||
if (stop_time != std::chrono::system_clock::time_point() &&
|
||||
stop_time <= std::chrono::system_clock::now()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. "
|
||||
"Stopping all tests."
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"The stop time has been passed. "
|
||||
"Stopping all tests."
|
||||
<< std::endl);
|
||||
this->StopTimePassed = true;
|
||||
return false;
|
||||
@ -330,10 +331,10 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
||||
bool testLoadOk = true;
|
||||
if (this->TestLoad > 0) {
|
||||
if (processors <= spareLoad) {
|
||||
cmCTestLog(this->CTest, DEBUG, "OK to run "
|
||||
<< GetName(test) << ", it requires " << processors
|
||||
<< " procs & system load is: " << systemLoad
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"OK to run " << GetName(test) << ", it requires "
|
||||
<< processors << " procs & system load is: "
|
||||
<< systemLoad << std::endl);
|
||||
allTestsFailedTestLoadCheck = false;
|
||||
} else {
|
||||
testLoadOk = false;
|
||||
@ -712,8 +713,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
||||
|
||||
if (!p.Labels.empty()) // print the labels
|
||||
{
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Labels:",
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Labels:", this->Quiet);
|
||||
}
|
||||
for (std::string const& label : p.Labels) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " " << label,
|
||||
@ -747,7 +748,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::endl
|
||||
<< "Total Tests: " << this->Total << std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
|
@ -74,6 +74,7 @@ public:
|
||||
cmCTestTestHandler* GetTestHandler() { return this->TestHandler; }
|
||||
|
||||
void SetQuiet(bool b) { this->Quiet = b; }
|
||||
|
||||
protected:
|
||||
// Start the next test or tests as many as are allowed by
|
||||
// ParallelLevel
|
||||
|
@ -372,8 +372,9 @@ bool cmCTestP4::NoteOldRevision()
|
||||
{
|
||||
this->OldRevision = this->GetWorkingRevision();
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
||||
<< this->OldRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Old revision of repository is: " << this->OldRevision
|
||||
<< "\n");
|
||||
this->PriorRev.Rev = this->OldRevision;
|
||||
return true;
|
||||
}
|
||||
@ -382,8 +383,9 @@ bool cmCTestP4::NoteNewRevision()
|
||||
{
|
||||
this->NewRevision = this->GetWorkingRevision();
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
||||
<< this->NewRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" New revision of repository is: " << this->NewRevision
|
||||
<< "\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -398,7 +400,8 @@ bool cmCTestP4::LoadRevisions()
|
||||
// If any revision is unknown it means we couldn't contact the server.
|
||||
// Do not process updates
|
||||
if (this->OldRevision == "<unknown>" || this->NewRevision == "<unknown>") {
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " At least one of the revisions "
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" At least one of the revisions "
|
||||
<< "is unknown. No repository changes will be reported.\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
|
||||
|
||||
void cmCTestRunTest::CheckOutput(std::string const& line)
|
||||
{
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex()
|
||||
<< ": " << line << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->GetIndex() << ": " << line << std::endl);
|
||||
this->ProcessOutput += line;
|
||||
this->ProcessOutput += "\n";
|
||||
|
||||
@ -50,7 +50,8 @@ void cmCTestRunTest::CheckOutput(std::string const& line)
|
||||
if (!this->TestProperties->TimeoutRegularExpressions.empty()) {
|
||||
for (auto& reg : this->TestProperties->TimeoutRegularExpressions) {
|
||||
if (reg.first.find(this->ProcessOutput.c_str())) {
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex()
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->GetIndex()
|
||||
<< ": "
|
||||
<< "Test timeout changed to "
|
||||
<< std::chrono::duration_cast<std::chrono::seconds>(
|
||||
@ -380,10 +381,10 @@ void cmCTestRunTest::MemCheckPostProcess()
|
||||
if (!this->TestHandler->MemCheck) {
|
||||
return;
|
||||
}
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||
<< ": process test output now: "
|
||||
<< this->TestProperties->Name << " "
|
||||
<< this->TestResult.Name << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->Index << ": process test output now: "
|
||||
<< this->TestProperties->Name << " "
|
||||
<< this->TestResult.Name << std::endl,
|
||||
this->TestHandler->GetQuiet());
|
||||
cmCTestMemCheckHandler* handler =
|
||||
static_cast<cmCTestMemCheckHandler*>(this->TestHandler);
|
||||
@ -425,7 +426,8 @@ void cmCTestRunTest::StartFailure(std::string const& output)
|
||||
bool cmCTestRunTest::StartTest(size_t total)
|
||||
{
|
||||
this->TotalNumberOfTests = total; // save for rerun case
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(2 * getNumWidth(total) + 8)
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(2 * getNumWidth(total) + 8)
|
||||
<< "Start "
|
||||
<< std::setw(getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||
<< this->TestProperties->Index << ": "
|
||||
@ -592,20 +594,21 @@ void cmCTestRunTest::ComputeArguments()
|
||||
this->TestResult.FullCommandLine = testCommand;
|
||||
|
||||
// Print the test command in verbose mode
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
std::endl
|
||||
<< this->Index << ": "
|
||||
<< (this->TestHandler->MemCheck ? "MemCheck" : "Test")
|
||||
<< " command: " << testCommand << std::endl);
|
||||
|
||||
// Print any test-specific env vars in verbose mode
|
||||
if (!this->TestProperties->Environment.empty()) {
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||
<< ": "
|
||||
<< "Environment variables: " << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->Index << ": "
|
||||
<< "Environment variables: " << std::endl);
|
||||
}
|
||||
for (std::string const& env : this->TestProperties->Environment) {
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << env
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->Index << ": " << env << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -658,10 +661,11 @@ bool cmCTestRunTest::ForkProcess(cmDuration testTimeOut, bool explicitTimeout,
|
||||
if (testTimeOut == cmDuration::zero() && explicitTimeout) {
|
||||
timeout = cmDuration::zero();
|
||||
}
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
||||
<< ": "
|
||||
<< "Test timeout computed to be: "
|
||||
<< cmDurationTo<unsigned int>(timeout) << "\n",
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
this->Index << ": "
|
||||
<< "Test timeout computed to be: "
|
||||
<< cmDurationTo<unsigned int>(timeout)
|
||||
<< "\n",
|
||||
this->TestHandler->GetQuiet());
|
||||
|
||||
this->TestProcess->SetTimeout(timeout);
|
||||
@ -687,20 +691,20 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
||||
// got for run until pass. Trick is when this is called we don't
|
||||
// yet know if we are passing or failing.
|
||||
if (this->NumberOfRunsLeft == 1) {
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
||||
<< completed << "/");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
||||
<< total << " ");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(getNumWidth(total)) << completed << "/");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(getNumWidth(total)) << total << " ");
|
||||
}
|
||||
// if this is one of several runs of a test just print blank space
|
||||
// to keep things neat
|
||||
else {
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
||||
<< " "
|
||||
<< " ");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
||||
<< " "
|
||||
<< " ");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(getNumWidth(total)) << " "
|
||||
<< " ");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::setw(getNumWidth(total)) << " "
|
||||
<< " ");
|
||||
}
|
||||
|
||||
if (this->TestHandler->MemCheck) {
|
||||
@ -746,8 +750,8 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
||||
<< std::endl;
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str());
|
||||
cmCTestLog(this->CTest, DEBUG, "Testing " << this->TestProperties->Name
|
||||
<< " ... ");
|
||||
cmCTestLog(this->CTest, DEBUG,
|
||||
"Testing " << this->TestProperties->Name << " ... ");
|
||||
}
|
||||
|
||||
void cmCTestRunTest::FinalizeTest()
|
||||
|
@ -107,9 +107,10 @@ bool cmCTestSVN::NoteOldRevision()
|
||||
svninfo.OldRevision = this->LoadInfo(svninfo);
|
||||
this->Log << "Revision for repository '" << svninfo.LocalPath
|
||||
<< "' before update: " << svninfo.OldRevision << "\n";
|
||||
cmCTestLog(
|
||||
this->CTest, HANDLER_OUTPUT, " Old revision of external repository '"
|
||||
<< svninfo.LocalPath << "' is: " << svninfo.OldRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Old revision of external repository '"
|
||||
<< svninfo.LocalPath << "' is: " << svninfo.OldRevision
|
||||
<< "\n");
|
||||
}
|
||||
|
||||
// Set the global old revision to the one of the root
|
||||
@ -128,9 +129,10 @@ bool cmCTestSVN::NoteNewRevision()
|
||||
svninfo.NewRevision = this->LoadInfo(svninfo);
|
||||
this->Log << "Revision for repository '" << svninfo.LocalPath
|
||||
<< "' after update: " << svninfo.NewRevision << "\n";
|
||||
cmCTestLog(
|
||||
this->CTest, HANDLER_OUTPUT, " New revision of external repository '"
|
||||
<< svninfo.LocalPath << "' is: " << svninfo.NewRevision << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" New revision of external repository '"
|
||||
<< svninfo.LocalPath << "' is: " << svninfo.NewRevision
|
||||
<< "\n");
|
||||
|
||||
// svninfo.Root = ""; // uncomment to test GuessBase
|
||||
this->Log << "Repository '" << svninfo.LocalPath
|
||||
@ -290,8 +292,9 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
|
||||
return RunChild(&args[0], out, err);
|
||||
}
|
||||
|
||||
class cmCTestSVN::LogParser : public cmCTestVC::OutputLogger,
|
||||
private cmXMLParser
|
||||
class cmCTestSVN::LogParser
|
||||
: public cmCTestVC::OutputLogger
|
||||
, private cmXMLParser
|
||||
{
|
||||
public:
|
||||
LogParser(cmCTestSVN* svn, const char* prefix, SVNInfo& svninfo)
|
||||
@ -302,6 +305,7 @@ public:
|
||||
this->InitializeParser();
|
||||
}
|
||||
~LogParser() override { this->CleanupParser(); }
|
||||
|
||||
private:
|
||||
cmCTestSVN* SVN;
|
||||
cmCTestSVN::SVNInfo& SVNRepo;
|
||||
|
@ -39,9 +39,9 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
# include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
class cmExecutionStatus;
|
||||
@ -184,8 +184,9 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
argv.push_back("-SR");
|
||||
argv.push_back(total_script_arg.c_str());
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Executable for CTest is: "
|
||||
<< cmSystemTools::GetCTestCommand() << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Executable for CTest is: " << cmSystemTools::GetCTestCommand()
|
||||
<< "\n");
|
||||
|
||||
// now pass through all the other arguments
|
||||
std::vector<std::string>& initArgs =
|
||||
@ -210,8 +211,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
int pipe =
|
||||
cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err);
|
||||
while (pipe != cmsysProcess_Pipe_None) {
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: " << line
|
||||
<< "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Output: " << line << "\n");
|
||||
if (pipe == cmsysProcess_Pipe_STDERR) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, line << "\n");
|
||||
} else if (pipe == cmsysProcess_Pipe_STDOUT) {
|
||||
@ -230,17 +231,19 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
retVal = cmsysProcess_GetExitValue(cp);
|
||||
} else if (result == cmsysProcess_State_Exception) {
|
||||
retVal = cmsysProcess_GetExitException(cp);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was an exception: "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"\tThere was an exception: "
|
||||
<< cmsysProcess_GetExceptionString(cp) << " " << retVal
|
||||
<< std::endl);
|
||||
failed = true;
|
||||
} else if (result == cmsysProcess_State_Expired) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"\tThere was a timeout" << std::endl);
|
||||
failed = true;
|
||||
} else if (result == cmsysProcess_State_Error) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing ctest: "
|
||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"\tError executing ctest: " << cmsysProcess_GetErrorString(cp)
|
||||
<< std::endl);
|
||||
failed = true;
|
||||
}
|
||||
cmsysProcess_Delete(cp);
|
||||
@ -253,8 +256,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
||||
message << arg << " ";
|
||||
}
|
||||
}
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, message.str() << argv[0]
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
message.str() << argv[0] << std::endl);
|
||||
return -1;
|
||||
}
|
||||
return retVal;
|
||||
@ -372,8 +375,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
||||
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
|
||||
if (!this->Makefile->ReadListFile(systemFile.c_str()) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:" << systemFile
|
||||
<< "\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error in read:" << systemFile << "\n");
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -98,14 +98,16 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
||||
this->Quiet);
|
||||
|
||||
if (smodel) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"Run dashboard with model "
|
||||
<< smodel << std::endl
|
||||
<< " Source directory: " << src_dir << std::endl
|
||||
<< " Build directory: " << bld_dir << std::endl,
|
||||
this->Quiet);
|
||||
} else {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with "
|
||||
"to-be-determined model"
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"Run dashboard with "
|
||||
"to-be-determined model"
|
||||
<< std::endl
|
||||
<< " Source directory: " << src_dir << std::endl
|
||||
<< " Build directory: " << bld_dir << std::endl,
|
||||
|
@ -28,9 +28,9 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#if defined(CTEST_USE_XMLRPC)
|
||||
#include "cmVersion.h"
|
||||
#include "cm_sys_stat.h"
|
||||
#include "cm_xmlrpc.h"
|
||||
# include "cmVersion.h"
|
||||
# include "cm_sys_stat.h"
|
||||
# include "cm_xmlrpc.h"
|
||||
#endif
|
||||
|
||||
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
|
||||
@ -248,14 +248,16 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
||||
res = ::curl_easy_perform(curl);
|
||||
|
||||
if (!chunk.empty()) {
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||
<< "]" << std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
if (!chunkDebug.empty()) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "CURL debug output: ["
|
||||
this->CTest, DEBUG,
|
||||
"CURL debug output: ["
|
||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
@ -263,8 +265,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
||||
|
||||
fclose(ftpfile);
|
||||
if (res) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
|
||||
<< local_file << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error when uploading file: " << local_file
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error message was: " << error_buffer << std::endl);
|
||||
*this->LogFile << " Error when uploading file: " << local_file
|
||||
@ -274,7 +277,8 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
||||
// avoid dereference of empty vector
|
||||
if (!chunk.empty()) {
|
||||
*this->LogFile << cmCTestLogWrite(&*chunk.begin(), chunk.size());
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||
<< std::endl);
|
||||
}
|
||||
@ -418,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
}
|
||||
}
|
||||
std::string upload_as = url +
|
||||
((url.find('?') == std::string::npos) ? '?' : '&') + "FileName=" +
|
||||
ofile;
|
||||
((url.find('?') == std::string::npos) ? '?' : '&') +
|
||||
"FileName=" + ofile;
|
||||
|
||||
upload_as += "&MD5=";
|
||||
|
||||
@ -475,7 +479,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
res = ::curl_easy_perform(curl);
|
||||
|
||||
if (!chunk.empty()) {
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||
<< "]" << std::endl,
|
||||
this->Quiet);
|
||||
@ -483,7 +488,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
}
|
||||
if (!chunkDebug.empty()) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "CURL debug output: ["
|
||||
this->CTest, DEBUG,
|
||||
"CURL debug output: ["
|
||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
@ -537,7 +543,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
|
||||
if (!chunk.empty()) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "CURL output: ["
|
||||
this->CTest, DEBUG,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
@ -552,8 +559,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
|
||||
fclose(ftpfile);
|
||||
if (res) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
|
||||
<< local_file << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error when uploading file: " << local_file
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Error message was: " << error_buffer << std::endl);
|
||||
*this->LogFile << " Error when uploading file: " << local_file
|
||||
@ -565,7 +573,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
*this->LogFile << " Curl output was: "
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||
<< std::endl;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||
<< std::endl);
|
||||
}
|
||||
@ -612,7 +621,8 @@ void cmCTestSubmitHandler::ParseResponse(
|
||||
}
|
||||
|
||||
if (this->HasWarnings || this->HasErrors) {
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Server Response:\n"
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Server Response:\n"
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "\n");
|
||||
}
|
||||
}
|
||||
@ -689,8 +699,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
}
|
||||
}
|
||||
std::string turl = url +
|
||||
((url.find('?') == std::string::npos) ? '?' : '&') + "xmlfile=" +
|
||||
ofile;
|
||||
((url.find('?') == std::string::npos) ? '?' : '&') +
|
||||
"xmlfile=" + ofile;
|
||||
*this->LogFile << "Trigger url: " << turl << std::endl;
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" Trigger url: " << turl << std::endl, this->Quiet);
|
||||
@ -709,7 +719,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
*this->LogFile << " Curl output was: "
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||
<< std::endl;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||
<< std::endl);
|
||||
}
|
||||
@ -719,14 +730,16 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
}
|
||||
|
||||
if (!chunk.empty()) {
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"CURL output: ["
|
||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||
<< "]" << std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
if (!chunkDebug.empty()) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, DEBUG, "CURL debug output: ["
|
||||
this->CTest, DEBUG,
|
||||
"CURL debug output: ["
|
||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
@ -777,9 +790,9 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
argv[1] = lfname.c_str();
|
||||
std::string rfname = url + "/" + remoteprefix + file;
|
||||
argv[2] = rfname.c_str();
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Execute \""
|
||||
<< argv[0] << "\" \"" << argv[1] << "\" \"" << argv[2]
|
||||
<< "\"" << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||
<< argv[2] << "\"" << std::endl,
|
||||
this->Quiet);
|
||||
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||
<< argv[2] << "\"" << std::endl;
|
||||
@ -824,13 +837,14 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
*this->LogFile << "\tThere was an exception: " << retVal << std::endl;
|
||||
problems++;
|
||||
} else if (result == cmsysProcess_State_Expired) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"\tThere was a timeout" << std::endl);
|
||||
*this->LogFile << "\tThere was a timeout" << std::endl;
|
||||
problems++;
|
||||
} else if (result == cmsysProcess_State_Error) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing SCP: "
|
||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"\tError executing SCP: " << cmsysProcess_GetErrorString(cp)
|
||||
<< std::endl);
|
||||
*this->LogFile << "\tError executing SCP: "
|
||||
<< cmsysProcess_GetErrorString(cp) << std::endl;
|
||||
problems++;
|
||||
@ -864,8 +878,9 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
|
||||
lfname += "/" + file;
|
||||
std::string rfname = destination + "/" + remoteprefix + file;
|
||||
cmSystemTools::CopyFileAlways(lfname, rfname);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
||||
<< lfname << " to " << rfname << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
" Copy file: " << lfname << " to " << rfname
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
||||
@ -892,8 +907,9 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
xmlrpc_env_init(&env);
|
||||
|
||||
/* Call the famous server at UserLand. */
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
|
||||
<< realURL << " (" << remoteprefix << ")" << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Submitting to: " << realURL << " (" << remoteprefix
|
||||
<< ")" << std::endl,
|
||||
this->Quiet);
|
||||
for (std::string const& file : files) {
|
||||
xmlrpc_value* result;
|
||||
@ -916,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
// make sure the file is not too big.
|
||||
if (static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
|
||||
static_cast<off_t>(st.st_size)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " << local_file
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" File too big: " << local_file << std::endl);
|
||||
return false;
|
||||
}
|
||||
size_t fileSize = static_cast<size_t>(st.st_size);
|
||||
@ -947,9 +963,10 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
delete[] fileBuffer;
|
||||
|
||||
if (env.fault_occurred) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Submission problem: "
|
||||
<< env.fault_string << " (" << env.fault_code << ")"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Submission problem: " << env.fault_string << " ("
|
||||
<< env.fault_code << ")"
|
||||
<< std::endl);
|
||||
xmlrpc_env_clean(&env);
|
||||
xmlrpc_client_cleanup();
|
||||
return false;
|
||||
@ -1004,8 +1021,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
return -1;
|
||||
}
|
||||
if (!cmSystemTools::FileExists(file)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Upload file not found: '"
|
||||
<< file << "'\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Upload file not found: '" << file << "'\n");
|
||||
return -1;
|
||||
}
|
||||
cmCTestCurl curl(this->CTest);
|
||||
@ -1040,8 +1057,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
unsigned long retryDelayValue = 0;
|
||||
if (!cmSystemTools::StringToULong(retryDelayString.c_str(),
|
||||
&retryDelayValue)) {
|
||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
|
||||
<< retryDelayString << std::endl);
|
||||
cmCTestLog(this->CTest, WARNING,
|
||||
"Invalid value for 'RETRY_DELAY' : " << retryDelayString
|
||||
<< std::endl);
|
||||
} else {
|
||||
retryDelay = std::chrono::seconds(retryDelayValue);
|
||||
}
|
||||
@ -1049,8 +1067,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
unsigned long retryCount = 0;
|
||||
if (!retryCountString.empty()) {
|
||||
if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) {
|
||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
|
||||
<< retryCountString << std::endl);
|
||||
cmCTestLog(this->CTest, WARNING,
|
||||
"Invalid value for 'RETRY_DELAY' : " << retryCountString
|
||||
<< std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1118,7 +1137,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
}
|
||||
}
|
||||
if (!internalTest && !requestSucceeded) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in HttpRequest\n"
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error in HttpRequest\n"
|
||||
<< response);
|
||||
return -1;
|
||||
}
|
||||
@ -1128,7 +1148,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
Json::Value json;
|
||||
Json::Reader reader;
|
||||
if (!internalTest && !reader.parse(response, json)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error parsing json string ["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"error parsing json string ["
|
||||
<< response << "]\n"
|
||||
<< reader.getFormattedErrorMessages() << "\n");
|
||||
return -1;
|
||||
@ -1195,12 +1216,14 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
||||
}
|
||||
|
||||
if (!uploadSucceeded) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error uploading to CDash. "
|
||||
<< file << " " << url << " " << fstr.str());
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"error uploading to CDash. " << file << " " << url << " "
|
||||
<< fstr.str());
|
||||
return -1;
|
||||
}
|
||||
if (!reader.parse(response, json)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error parsing json string ["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"error parsing json string ["
|
||||
<< response << "]\n"
|
||||
<< reader.getFormattedErrorMessages() << "\n");
|
||||
return -1;
|
||||
@ -1357,7 +1380,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
cnt++;
|
||||
}
|
||||
}
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files (using "
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"Submit files (using "
|
||||
<< this->CTest->GetCTestConfiguration("DropMethod")
|
||||
<< ")" << std::endl,
|
||||
this->Quiet);
|
||||
@ -1380,8 +1404,9 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
std::string url = "ftp://";
|
||||
url += cmCTest::MakeURLSafe(
|
||||
this->CTest->GetCTestConfiguration("DropSiteUser")) +
|
||||
":" + cmCTest::MakeURLSafe(
|
||||
this->CTest->GetCTestConfiguration("DropSitePassword")) +
|
||||
":" +
|
||||
cmCTest::MakeURLSafe(
|
||||
this->CTest->GetCTestConfiguration("DropSitePassword")) +
|
||||
"@" + this->CTest->GetCTestConfiguration("DropSite") +
|
||||
cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration("DropLocation"));
|
||||
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
|
||||
@ -1409,12 +1434,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
return -1;
|
||||
}
|
||||
if (!this->CDash) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
||||
<< std::endl
|
||||
<< " Trigger site: "
|
||||
<< this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Using HTTP trigger method"
|
||||
<< std::endl
|
||||
<< " Trigger site: "
|
||||
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
if (!this->TriggerUsingHTTP(
|
||||
files, prefix,
|
||||
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
||||
@ -1466,12 +1492,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
return -1;
|
||||
}
|
||||
if (!this->CDash) {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
||||
<< std::endl
|
||||
<< " Trigger site: "
|
||||
<< this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Using HTTP trigger method"
|
||||
<< std::endl
|
||||
<< " Trigger site: "
|
||||
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
if (!this->TriggerUsingHTTP(
|
||||
files, prefix,
|
||||
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
||||
@ -1482,15 +1509,17 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
}
|
||||
}
|
||||
if (this->HasErrors) {
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Errors occurred during "
|
||||
"submission."
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Errors occurred during "
|
||||
"submission."
|
||||
<< std::endl);
|
||||
ofs << " Errors occurred during submission. " << std::endl;
|
||||
} else {
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT, " Submission successful"
|
||||
<< (this->HasWarnings ? ", with warnings." : "") << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Submission successful"
|
||||
<< (this->HasWarnings ? ", with warnings." : "")
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
ofs << " Submission successful"
|
||||
<< (this->HasWarnings ? ", with warnings." : "") << std::endl;
|
||||
}
|
||||
@ -1587,8 +1616,9 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
return 0;
|
||||
}
|
||||
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Unknown submission method: \""
|
||||
<< dropMethod << "\"" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Unknown submission method: \"" << dropMethod << "\""
|
||||
<< std::endl);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -112,14 +112,16 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
|
||||
if (!cmSystemTools::StringToULong(this->Values[ctt_TEST_LOAD],
|
||||
&testLoad)) {
|
||||
testLoad = 0;
|
||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'TEST_LOAD' : "
|
||||
cmCTestLog(this->CTest, WARNING,
|
||||
"Invalid value for 'TEST_LOAD' : "
|
||||
<< this->Values[ctt_TEST_LOAD] << std::endl);
|
||||
}
|
||||
} else if (ctestTestLoad && *ctestTestLoad) {
|
||||
if (!cmSystemTools::StringToULong(ctestTestLoad, &testLoad)) {
|
||||
testLoad = 0;
|
||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'CTEST_TEST_LOAD' : "
|
||||
<< ctestTestLoad << std::endl);
|
||||
cmCTestLog(this->CTest, WARNING,
|
||||
"Invalid value for 'CTEST_TEST_LOAD' : " << ctestTestLoad
|
||||
<< std::endl);
|
||||
}
|
||||
} else {
|
||||
testLoad = this->CTest->GetTestLoad();
|
||||
|
@ -259,7 +259,7 @@ public:
|
||||
/**
|
||||
* This is called when the command is first encountered in
|
||||
* the CMakeLists.txt file.
|
||||
*/
|
||||
*/
|
||||
bool InitialPass(std::vector<std::string> const& /*unused*/,
|
||||
cmExecutionStatus& /*unused*/) override;
|
||||
|
||||
@ -472,11 +472,12 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
|
||||
this->TestResults.clear();
|
||||
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT, (this->MemCheck ? "Memory check" : "Test")
|
||||
<< " project " << cmSystemTools::GetCurrentWorkingDirectory()
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
(this->MemCheck ? "Memory check" : "Test")
|
||||
<< " project "
|
||||
<< cmSystemTools::GetCurrentWorkingDirectory()
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
if (!this->PreProcessHandler()) {
|
||||
return -1;
|
||||
}
|
||||
@ -500,13 +501,14 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
|
||||
if (total == 0) {
|
||||
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"No tests were found!!!" << std::endl);
|
||||
}
|
||||
} else {
|
||||
if (this->HandlerVerbose && !passed.empty() &&
|
||||
(this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag)) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
std::endl
|
||||
<< "The following tests passed:" << std::endl,
|
||||
this->Quiet);
|
||||
for (std::string const& j : passed) {
|
||||
@ -533,7 +535,8 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
percent = 99;
|
||||
}
|
||||
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::endl
|
||||
<< static_cast<int>(percent + .5f) << "% tests passed, "
|
||||
<< failed.size() << " tests failed out of " << total
|
||||
<< std::endl);
|
||||
@ -553,7 +556,8 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
|
||||
if (!disabledTests.empty()) {
|
||||
cmGeneratedFileStream ofs;
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::endl
|
||||
<< "The following tests did not run:" << std::endl);
|
||||
this->StartLogFile("TestsDisabled", ofs);
|
||||
|
||||
@ -565,15 +569,16 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
} else {
|
||||
disabled_reason = "Skipped";
|
||||
}
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
|
||||
<< std::setw(3) << dt.TestCount << " - " << dt.Name
|
||||
<< " (" << disabled_reason << ")" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
"\t" << std::setw(3) << dt.TestCount << " - " << dt.Name
|
||||
<< " (" << disabled_reason << ")" << std::endl);
|
||||
}
|
||||
}
|
||||
|
||||
if (!failed.empty()) {
|
||||
cmGeneratedFileStream ofs;
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
std::endl
|
||||
<< "The following tests FAILED:" << std::endl);
|
||||
this->StartLogFile("TestsFailed", ofs);
|
||||
|
||||
@ -582,9 +587,10 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
!cmHasLiteralPrefix(ft.CompletionStatus, "SKIP_RETURN_CODE=") &&
|
||||
ft.CompletionStatus != "Disabled") {
|
||||
ofs << ft.TestCount << ":" << ft.Name << std::endl;
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
|
||||
<< std::setw(3) << ft.TestCount << " - " << ft.Name
|
||||
<< " (" << this->GetTestStatus(ft) << ")" << std::endl);
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
"\t" << std::setw(3) << ft.TestCount << " - " << ft.Name
|
||||
<< " (" << this->GetTestStatus(ft) << ")"
|
||||
<< std::endl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -595,7 +601,8 @@ int cmCTestTestHandler::ProcessHandler()
|
||||
if (!this->StartResultingXML(
|
||||
(this->MemCheck ? cmCTest::PartMemCheck : cmCTest::PartTest),
|
||||
(this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot create "
|
||||
<< (this->MemCheck ? "memory check" : "testing")
|
||||
<< " XML file" << std::endl);
|
||||
this->LogFile = nullptr;
|
||||
@ -671,8 +678,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"\nSubproject Time Summary:", this->Quiet);
|
||||
} else {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"\nLabel Time Summary:", this->Quiet);
|
||||
}
|
||||
for (std::string const& i : labels) {
|
||||
std::string label = i;
|
||||
@ -687,7 +694,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
||||
labelCountStr << "s";
|
||||
}
|
||||
labelCountStr << ")";
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
"\n"
|
||||
<< label << " = " << buf << " "
|
||||
<< labelCountStr.str(),
|
||||
this->Quiet);
|
||||
@ -1089,9 +1097,10 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const
|
||||
}
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Added "
|
||||
<< fixtureTestsAdded
|
||||
<< " tests to meet fixture requirements" << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
"Added " << fixtureTestsAdded
|
||||
<< " tests to meet fixture requirements"
|
||||
<< std::endl,
|
||||
this->Quiet);
|
||||
}
|
||||
|
||||
@ -1119,8 +1128,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, int& value,
|
||||
fin >> value;
|
||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||
<< std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
@ -1136,8 +1146,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, double& value,
|
||||
fin >> value;
|
||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||
<< std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
@ -1162,8 +1173,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, bool& value,
|
||||
#endif
|
||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||
<< std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
@ -1179,8 +1191,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, size_t& value,
|
||||
fin >> value;
|
||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||
<< std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
@ -1195,8 +1208,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, std::string& value,
|
||||
if (line == tag) {
|
||||
ret = cmSystemTools::GetLineFromStream(fin, value);
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
||||
<< tag << " found [" << line << "]" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||
<< std::endl);
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
@ -1611,7 +1625,8 @@ std::string cmCTestTestHandler::FindExecutable(
|
||||
}
|
||||
}
|
||||
if (fullPath.empty()) {
|
||||
cmCTestLog(ctest, HANDLER_OUTPUT, "Could not find executable "
|
||||
cmCTestLog(ctest, HANDLER_OUTPUT,
|
||||
"Could not find executable "
|
||||
<< testCommand << "\n"
|
||||
<< "Looked in the following places:\n");
|
||||
for (std::string const& f : failed) {
|
||||
@ -1793,8 +1808,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
||||
|
||||
cmsys::Directory directory;
|
||||
if (directory.Load(dirName) == 0) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to read the contents of "
|
||||
<< dirName << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Unable to read the contents of " << dirName << std::endl);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1829,8 +1844,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
||||
|
||||
if (!cmSystemTools::FileExists(lastTestsFailedLog)) {
|
||||
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, lastTestsFailedLog
|
||||
<< " does not exist!" << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
lastTestsFailedLog << " does not exist!" << std::endl);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -1852,7 +1867,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
||||
ifs.close();
|
||||
} else if (!this->CTest->GetShowOnly() &&
|
||||
!this->CTest->ShouldPrintLabels()) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Problem reading file: "
|
||||
<< lastTestsFailedLog
|
||||
<< " while generating list of previously failed tests."
|
||||
<< std::endl);
|
||||
@ -1961,11 +1977,12 @@ void cmCTestTestHandler::GenerateRegressionImages(cmXMLWriter& xml,
|
||||
xml.Element("Value", "Image " + filename + " is empty");
|
||||
xml.EndElement();
|
||||
} else {
|
||||
cmsys::ifstream ifs(filename.c_str(), std::ios::in
|
||||
cmsys::ifstream ifs(filename.c_str(),
|
||||
std::ios::in
|
||||
#ifdef _WIN32
|
||||
| std::ios::binary
|
||||
#endif
|
||||
);
|
||||
);
|
||||
unsigned char* file_buffer = new unsigned char[len + 1];
|
||||
ifs.read(reinterpret_cast<char*>(file_buffer), len);
|
||||
unsigned char* encoded_buffer = new unsigned char[static_cast<int>(
|
||||
@ -2002,9 +2019,9 @@ void cmCTestTestHandler::GenerateRegressionImages(cmXMLWriter& xml,
|
||||
xml.Attribute("text", "text/string");
|
||||
xml.Element("Value", "File " + filename + " not found");
|
||||
xml.EndElement();
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "File \""
|
||||
<< filename << "\" not found." << std::endl,
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT,
|
||||
"File \"" << filename << "\" not found." << std::endl, this->Quiet);
|
||||
}
|
||||
cxml.erase(measurementfile.start(),
|
||||
measurementfile.end() - measurementfile.start());
|
||||
|
@ -47,7 +47,8 @@ void cmCTestUpdateHandler::Initialize()
|
||||
|
||||
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
||||
{
|
||||
cmCTestOptionalLog(this->CTest, DEBUG, "Determine update type from command: "
|
||||
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||
"Determine update type from command: "
|
||||
<< cmd << " and type: " << type << std::endl,
|
||||
this->Quiet);
|
||||
if (type && *type) {
|
||||
@ -130,7 +131,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||
return -1;
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use "
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Use "
|
||||
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
|
||||
<< " repository type" << std::endl;
|
||||
, this->Quiet);
|
||||
@ -171,8 +173,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||
//
|
||||
cmGeneratedFileStream os;
|
||||
if (!this->StartResultingXML(cmCTest::PartUpdate, "Update", os)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open log file" << std::endl);
|
||||
return -1;
|
||||
}
|
||||
std::string start_time = this->CTest->CurrentTime();
|
||||
@ -191,7 +193,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||
std::string("ctest-") + cmVersion::GetCMakeVersion());
|
||||
xml.Element("Site", this->CTest->GetCTestConfiguration("Site"));
|
||||
xml.Element("BuildName", buildname);
|
||||
xml.Element("BuildStamp", this->CTest->GetCurrentTag() + "-" +
|
||||
xml.Element("BuildStamp",
|
||||
this->CTest->GetCurrentTag() + "-" +
|
||||
this->CTest->GetTestModelString());
|
||||
xml.Element("StartDateTime", start_time);
|
||||
xml.Element("StartTime", start_time_time);
|
||||
@ -209,9 +212,9 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||
this->Quiet);
|
||||
}
|
||||
if (int numModified = vc->GetPathCount(cmCTestVC::PathModified)) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Found "
|
||||
<< numModified << " locally modified files\n",
|
||||
this->Quiet);
|
||||
cmCTestOptionalLog(
|
||||
this->CTest, HANDLER_OUTPUT,
|
||||
" Found " << numModified << " locally modified files\n", this->Quiet);
|
||||
localModifications += numModified;
|
||||
}
|
||||
if (int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting)) {
|
||||
@ -241,8 +244,9 @@ int cmCTestUpdateHandler::ProcessHandler()
|
||||
if (!updated) {
|
||||
xml.Content("Update command failed:\n");
|
||||
xml.Content(vc->GetUpdateCommandLine());
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Update command failed: "
|
||||
<< vc->GetUpdateCommandLine() << "\n");
|
||||
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||
" Update command failed: " << vc->GetUpdateCommandLine()
|
||||
<< "\n");
|
||||
}
|
||||
xml.EndElement(); // UpdateReturnStatus
|
||||
xml.EndElement(); // Update
|
||||
|
@ -30,8 +30,8 @@ int cmCTestUploadHandler::ProcessHandler()
|
||||
cmGeneratedFileStream ofs;
|
||||
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), "Upload.xml",
|
||||
ofs)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open Upload.xml file"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot open Upload.xml file" << std::endl);
|
||||
return -1;
|
||||
}
|
||||
std::string buildname =
|
||||
@ -45,7 +45,8 @@ int cmCTestUploadHandler::ProcessHandler()
|
||||
"<file:///Dart/Source/Server/XSL/Build.xsl> \"");
|
||||
xml.StartElement("Site");
|
||||
xml.Attribute("BuildName", buildname);
|
||||
xml.Attribute("BuildStamp", this->CTest->GetCurrentTag() + "-" +
|
||||
xml.Attribute("BuildStamp",
|
||||
this->CTest->GetCurrentTag() + "-" +
|
||||
this->CTest->GetTestModelString());
|
||||
xml.Attribute("Name", this->CTest->GetCTestConfiguration("Site"));
|
||||
xml.Attribute("Generator",
|
||||
|
@ -69,8 +69,8 @@ bool cmCTestVC::InitialCheckout(const char* command)
|
||||
bool result = this->RunChild(&vc_co[0], &out, &err, parent.c_str());
|
||||
this->Log << "--- End Initial Checkout ---\n";
|
||||
if (!result) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initial checkout failed!"
|
||||
<< std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Initial checkout failed!" << std::endl);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -100,10 +100,11 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
||||
std::string line;
|
||||
std::vector<std::string> separateLine;
|
||||
if (!cmSystemTools::GetLineFromStream(in, line)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Empty file : "
|
||||
<< file << " referenced in this line of cmcov data:\n"
|
||||
"["
|
||||
<< line << "]\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Empty file : " << file
|
||||
<< " referenced in this line of cmcov data:\n"
|
||||
"["
|
||||
<< line << "]\n");
|
||||
return false;
|
||||
}
|
||||
separateLine.clear();
|
||||
@ -112,8 +113,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
||||
separateLine[1] != "Line" || separateLine[2] != "RtnLine" ||
|
||||
separateLine[3] != "Code") {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Bad first line of cmcov file : " << file << " line:\n"
|
||||
"["
|
||||
"Bad first line of cmcov file : " << file
|
||||
<< " line:\n"
|
||||
"["
|
||||
<< line << "]\n");
|
||||
}
|
||||
std::string routine;
|
||||
@ -128,8 +130,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
||||
if (separateLine.size() < 4) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Bad line of cmcov file expected at least 4 found: "
|
||||
<< separateLine.size() << " " << file << " line:\n"
|
||||
"["
|
||||
<< separateLine.size() << " " << file
|
||||
<< " line:\n"
|
||||
"["
|
||||
<< line << "]\n");
|
||||
for (std::string::size_type i = 0; i < separateLine.size(); ++i) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "" << separateLine[1] << " ");
|
||||
|
@ -108,8 +108,9 @@ public:
|
||||
while (true) {
|
||||
lastoffset = line.find('(', pos);
|
||||
if (lastoffset == std::string::npos) {
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, endnamepos
|
||||
<< "File not found " << lastoffset << std::endl,
|
||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||
endnamepos << "File not found " << lastoffset
|
||||
<< std::endl,
|
||||
this->Coverage.Quiet);
|
||||
return false;
|
||||
}
|
||||
|
@ -75,7 +75,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
||||
this->Coverage.TotalCoverage[lastpath][lastoffset + linenumber] +=
|
||||
count;
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Can not find mumps file : "
|
||||
<< lastroutine
|
||||
<< " referenced in this line of mcov data:\n"
|
||||
"["
|
||||
@ -102,9 +103,11 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
||||
lastoffset = lineoffset;
|
||||
}
|
||||
} else {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
|
||||
<< routine << " referenced in this line of mcov data:\n"
|
||||
"["
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Can not find mumps file : "
|
||||
<< routine
|
||||
<< " referenced in this line of mcov data:\n"
|
||||
"["
|
||||
<< line << "]\n");
|
||||
}
|
||||
lastfunction = function;
|
||||
@ -144,8 +147,9 @@ bool cmParseGTMCoverage::FindFunctionInMumpsFile(std::string const& filepath,
|
||||
linenum++; // move to next line count
|
||||
}
|
||||
lineoffset = 0;
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not find entry point : "
|
||||
<< function << " in " << filepath << "\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Could not find entry point : " << function << " in " << filepath
|
||||
<< "\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -221,8 +225,8 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
|
||||
}
|
||||
// less then two arguments is an error
|
||||
if (args.size() < 2) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing mcov line: ["
|
||||
<< line << "]\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Error parsing mcov line: [" << line << "]\n");
|
||||
return false;
|
||||
}
|
||||
routine = args[0]; // the routine is the first argument
|
||||
|
@ -38,8 +38,9 @@ protected:
|
||||
|
||||
if (this->PackagePath.empty()) {
|
||||
if (!this->FindPackagePath(fileName)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
|
||||
<< this->PackageName << "/" << fileName << std::endl);
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Cannot find file: " << this->PackageName << "/"
|
||||
<< fileName << std::endl);
|
||||
this->Coverage.Error++;
|
||||
return;
|
||||
}
|
||||
|
@ -153,7 +153,8 @@ bool cmParsePHPCoverage::ReadFileInformation(std::istream& in)
|
||||
delete[] s;
|
||||
// read close quote
|
||||
if (in.get(c) && c != '"') {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "failed to read close quote\n"
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"failed to read close quote\n"
|
||||
<< "read [" << c << "]\n");
|
||||
return false;
|
||||
}
|
||||
@ -184,8 +185,8 @@ bool cmParsePHPCoverage::ReadPHPData(const char* file)
|
||||
}
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (!this->ReadFileInformation(in)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Failed to read file #" << i
|
||||
<< "\n");
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
"Failed to read file #" << i << "\n");
|
||||
return false;
|
||||
}
|
||||
in.get(c);
|
||||
|
@ -13,13 +13,13 @@
|
||||
#include <signal.h>
|
||||
#include <string>
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#define CM_PROCESS_BUF_SIZE 65536
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#include <io.h>
|
||||
# include <io.h>
|
||||
|
||||
static int cmProcessGetPipes(int* fds)
|
||||
{
|
||||
@ -40,7 +40,7 @@ static int cmProcessGetPipes(int* fds)
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
#include <errno.h>
|
||||
# include <errno.h>
|
||||
|
||||
static int cmProcessGetPipes(int* fds)
|
||||
{
|
||||
@ -167,8 +167,9 @@ bool cmProcess::StartProcess(uv_loop_t& loop, std::vector<size_t>* affinity)
|
||||
|
||||
status = this->Process.spawn(loop, options, this);
|
||||
if (status != 0) {
|
||||
cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE, "Process not started\n "
|
||||
<< this->Command << "\n[" << uv_strerror(status) << "]\n");
|
||||
cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE,
|
||||
"Process not started\n " << this->Command << "\n["
|
||||
<< uv_strerror(status) << "]\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -345,7 +346,7 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal)
|
||||
#else
|
||||
term_signal != 0
|
||||
#endif
|
||||
) {
|
||||
) {
|
||||
this->ProcessState = cmProcess::State::Exception;
|
||||
} else {
|
||||
this->ProcessState = cmProcess::State::Exited;
|
||||
@ -391,7 +392,7 @@ cmProcess::Exception cmProcess::GetExitException()
|
||||
{
|
||||
auto exception = Exception::None;
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
auto exit_code = (DWORD) this->ExitValue;
|
||||
auto exit_code = (DWORD)this->ExitValue;
|
||||
if ((exit_code & 0xF0000000) != 0xC0000000) {
|
||||
return exception;
|
||||
}
|
||||
@ -415,12 +416,12 @@ cmProcess::Exception cmProcess::GetExitException()
|
||||
case STATUS_FLOAT_OVERFLOW:
|
||||
case STATUS_FLOAT_STACK_CHECK:
|
||||
case STATUS_FLOAT_UNDERFLOW:
|
||||
#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||
# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
||||
#endif
|
||||
#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||
# endif
|
||||
# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
||||
#endif
|
||||
# endif
|
||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||
case STATUS_INTEGER_OVERFLOW:
|
||||
exception = Exception::Numerical;
|
||||
@ -488,16 +489,16 @@ std::string cmProcess::GetExitExceptionString()
|
||||
case STATUS_FLOAT_UNDERFLOW:
|
||||
exception_str = "Floating-point underflow";
|
||||
break;
|
||||
#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||
# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
||||
exception_str = "Floating-point exception (multiple faults)";
|
||||
break;
|
||||
#endif
|
||||
#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||
# endif
|
||||
# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
||||
exception_str = "Floating-point exception (multiple traps)";
|
||||
break;
|
||||
#endif
|
||||
# endif
|
||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||
exception_str = "Integer divide-by-zero";
|
||||
break;
|
||||
@ -544,188 +545,188 @@ std::string cmProcess::GetExitExceptionString()
|
||||
}
|
||||
#else
|
||||
switch (this->Signal) {
|
||||
#ifdef SIGSEGV
|
||||
# ifdef SIGSEGV
|
||||
case SIGSEGV:
|
||||
exception_str = "Segmentation fault";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGBUS
|
||||
#if !defined(SIGSEGV) || SIGBUS != SIGSEGV
|
||||
# endif
|
||||
# ifdef SIGBUS
|
||||
# if !defined(SIGSEGV) || SIGBUS != SIGSEGV
|
||||
case SIGBUS:
|
||||
exception_str = "Bus error";
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIGFPE
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SIGFPE
|
||||
case SIGFPE:
|
||||
exception_str = "Floating-point exception";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGILL
|
||||
# endif
|
||||
# ifdef SIGILL
|
||||
case SIGILL:
|
||||
exception_str = "Illegal instruction";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGINT
|
||||
# endif
|
||||
# ifdef SIGINT
|
||||
case SIGINT:
|
||||
exception_str = "User interrupt";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGABRT
|
||||
# endif
|
||||
# ifdef SIGABRT
|
||||
case SIGABRT:
|
||||
exception_str = "Child aborted";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGKILL
|
||||
# endif
|
||||
# ifdef SIGKILL
|
||||
case SIGKILL:
|
||||
exception_str = "Child killed";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGTERM
|
||||
# endif
|
||||
# ifdef SIGTERM
|
||||
case SIGTERM:
|
||||
exception_str = "Child terminated";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGHUP
|
||||
# endif
|
||||
# ifdef SIGHUP
|
||||
case SIGHUP:
|
||||
exception_str = "SIGHUP";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGQUIT
|
||||
# endif
|
||||
# ifdef SIGQUIT
|
||||
case SIGQUIT:
|
||||
exception_str = "SIGQUIT";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGTRAP
|
||||
# endif
|
||||
# ifdef SIGTRAP
|
||||
case SIGTRAP:
|
||||
exception_str = "SIGTRAP";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGIOT
|
||||
#if !defined(SIGABRT) || SIGIOT != SIGABRT
|
||||
# endif
|
||||
# ifdef SIGIOT
|
||||
# if !defined(SIGABRT) || SIGIOT != SIGABRT
|
||||
case SIGIOT:
|
||||
exception_str = "SIGIOT";
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIGUSR1
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SIGUSR1
|
||||
case SIGUSR1:
|
||||
exception_str = "SIGUSR1";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGUSR2
|
||||
# endif
|
||||
# ifdef SIGUSR2
|
||||
case SIGUSR2:
|
||||
exception_str = "SIGUSR2";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGPIPE
|
||||
# endif
|
||||
# ifdef SIGPIPE
|
||||
case SIGPIPE:
|
||||
exception_str = "SIGPIPE";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGALRM
|
||||
# endif
|
||||
# ifdef SIGALRM
|
||||
case SIGALRM:
|
||||
exception_str = "SIGALRM";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGSTKFLT
|
||||
# endif
|
||||
# ifdef SIGSTKFLT
|
||||
case SIGSTKFLT:
|
||||
exception_str = "SIGSTKFLT";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGCHLD
|
||||
# endif
|
||||
# ifdef SIGCHLD
|
||||
case SIGCHLD:
|
||||
exception_str = "SIGCHLD";
|
||||
break;
|
||||
#elif defined(SIGCLD)
|
||||
# elif defined(SIGCLD)
|
||||
case SIGCLD:
|
||||
exception_str = "SIGCLD";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGCONT
|
||||
# endif
|
||||
# ifdef SIGCONT
|
||||
case SIGCONT:
|
||||
exception_str = "SIGCONT";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGSTOP
|
||||
# endif
|
||||
# ifdef SIGSTOP
|
||||
case SIGSTOP:
|
||||
exception_str = "SIGSTOP";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGTSTP
|
||||
# endif
|
||||
# ifdef SIGTSTP
|
||||
case SIGTSTP:
|
||||
exception_str = "SIGTSTP";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGTTIN
|
||||
# endif
|
||||
# ifdef SIGTTIN
|
||||
case SIGTTIN:
|
||||
exception_str = "SIGTTIN";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGTTOU
|
||||
# endif
|
||||
# ifdef SIGTTOU
|
||||
case SIGTTOU:
|
||||
exception_str = "SIGTTOU";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGURG
|
||||
# endif
|
||||
# ifdef SIGURG
|
||||
case SIGURG:
|
||||
exception_str = "SIGURG";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGXCPU
|
||||
# endif
|
||||
# ifdef SIGXCPU
|
||||
case SIGXCPU:
|
||||
exception_str = "SIGXCPU";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGXFSZ
|
||||
# endif
|
||||
# ifdef SIGXFSZ
|
||||
case SIGXFSZ:
|
||||
exception_str = "SIGXFSZ";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGVTALRM
|
||||
# endif
|
||||
# ifdef SIGVTALRM
|
||||
case SIGVTALRM:
|
||||
exception_str = "SIGVTALRM";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGPROF
|
||||
# endif
|
||||
# ifdef SIGPROF
|
||||
case SIGPROF:
|
||||
exception_str = "SIGPROF";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGWINCH
|
||||
# endif
|
||||
# ifdef SIGWINCH
|
||||
case SIGWINCH:
|
||||
exception_str = "SIGWINCH";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGPOLL
|
||||
# endif
|
||||
# ifdef SIGPOLL
|
||||
case SIGPOLL:
|
||||
exception_str = "SIGPOLL";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGIO
|
||||
#if !defined(SIGPOLL) || SIGIO != SIGPOLL
|
||||
# endif
|
||||
# ifdef SIGIO
|
||||
# if !defined(SIGPOLL) || SIGIO != SIGPOLL
|
||||
case SIGIO:
|
||||
exception_str = "SIGIO";
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SIGPWR
|
||||
# endif
|
||||
# endif
|
||||
# ifdef SIGPWR
|
||||
case SIGPWR:
|
||||
exception_str = "SIGPWR";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGSYS
|
||||
# endif
|
||||
# ifdef SIGSYS
|
||||
case SIGSYS:
|
||||
exception_str = "SIGSYS";
|
||||
break;
|
||||
#endif
|
||||
#ifdef SIGUNUSED
|
||||
#if !defined(SIGSYS) || SIGUNUSED != SIGSYS
|
||||
# endif
|
||||
# ifdef SIGUNUSED
|
||||
# if !defined(SIGSYS) || SIGUNUSED != SIGSYS
|
||||
case SIGUNUSED:
|
||||
exception_str = "SIGUNUSED";
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
# endif
|
||||
# endif
|
||||
default:
|
||||
exception_str = "Signal ";
|
||||
exception_str += std::to_string(this->Signal);
|
||||
|
@ -1,11 +1,11 @@
|
||||
#if defined(CURSES_HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
# include <ncurses.h>
|
||||
#elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
|
||||
#include <ncurses/ncurses.h>
|
||||
# include <ncurses/ncurses.h>
|
||||
#elif defined(CURSES_HAVE_NCURSES_CURSES_H)
|
||||
#include <ncurses/curses.h>
|
||||
# include <ncurses/curses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
# include <curses.h>
|
||||
#endif
|
||||
|
||||
int main()
|
||||
|
@ -22,11 +22,13 @@ static const char* cmDocumentationName[][2] = {
|
||||
};
|
||||
|
||||
static const char* cmDocumentationUsage[][2] = {
|
||||
{ nullptr, " ccmake <path-to-source>\n"
|
||||
" ccmake <path-to-existing-build>" },
|
||||
{ nullptr, "Specify a source directory to (re-)generate a build system for "
|
||||
"it in the current working directory. Specify an existing build "
|
||||
"directory to re-generate its build system." },
|
||||
{ nullptr,
|
||||
" ccmake <path-to-source>\n"
|
||||
" ccmake <path-to-existing-build>" },
|
||||
{ nullptr,
|
||||
"Specify a source directory to (re-)generate a build system for "
|
||||
"it in the current working directory. Specify an existing build "
|
||||
"directory to re-generate its build system." },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
@ -35,9 +37,10 @@ static const char* cmDocumentationUsageNote[][2] = {
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
static const char* cmDocumentationOptions[]
|
||||
[2] = { CMAKE_STANDARD_OPTIONS_TABLE,
|
||||
{ nullptr, nullptr } };
|
||||
static const char* cmDocumentationOptions[][2] = {
|
||||
CMAKE_STANDARD_OPTIONS_TABLE,
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
cmCursesForm* cmCursesForm::CurrentForm = nullptr;
|
||||
|
||||
|
@ -371,8 +371,9 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
||||
sprintf(thirdLine, toggleKeyInstruction,
|
||||
this->AdvancedMode ? "On" : "Off");
|
||||
}
|
||||
sprintf(secondLine, "Press [h] for help "
|
||||
"Press [q] to quit without generating");
|
||||
sprintf(secondLine,
|
||||
"Press [h] for help "
|
||||
"Press [q] to quit without generating");
|
||||
}
|
||||
|
||||
curses_move(y - 4, 0);
|
||||
@ -412,9 +413,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
||||
curses_clear();
|
||||
curses_move(0, 0);
|
||||
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
|
||||
printw(fmt, (cmCursesMainForm::MIN_WIDTH < this->InitialWidth
|
||||
? this->InitialWidth
|
||||
: cmCursesMainForm::MIN_WIDTH),
|
||||
printw(fmt,
|
||||
(cmCursesMainForm::MIN_WIDTH < this->InitialWidth
|
||||
? this->InitialWidth
|
||||
: cmCursesMainForm::MIN_WIDTH),
|
||||
cmCursesMainForm::MIN_HEIGHT);
|
||||
touchwin(stdscr);
|
||||
wrefresh(stdscr);
|
||||
@ -568,10 +570,11 @@ int cmCursesMainForm::Configure(int noconfigure)
|
||||
}
|
||||
int xx, yy;
|
||||
getmaxyx(stdscr, yy, xx);
|
||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
|
||||
this->Errors, cmSystemTools::GetErrorOccuredFlag()
|
||||
? "Errors occurred during the last pass."
|
||||
: "CMake produced the following output.");
|
||||
cmCursesLongMessageForm* msgs =
|
||||
new cmCursesLongMessageForm(this->Errors,
|
||||
cmSystemTools::GetErrorOccuredFlag()
|
||||
? "Errors occurred during the last pass."
|
||||
: "CMake produced the following output.");
|
||||
// reset error condition
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
CurrentForm = msgs;
|
||||
|
@ -7,12 +7,12 @@
|
||||
|
||||
// Record whether __attribute__ is currently defined. See purpose below.
|
||||
#ifndef __attribute__
|
||||
#define cm_no__attribute__
|
||||
# define cm_no__attribute__
|
||||
#endif
|
||||
|
||||
#if defined(__hpux)
|
||||
#define _BOOL_DEFINED
|
||||
#include <sys/time.h>
|
||||
# define _BOOL_DEFINED
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <form.h>
|
||||
@ -38,7 +38,7 @@ inline void curses_clear()
|
||||
// define __attribute__ as a macro. This breaks C++ headers
|
||||
// in some cases, so undefine it now.
|
||||
#if defined(cm_no__attribute__) && defined(__attribute__)
|
||||
#undef __attribute__
|
||||
# undef __attribute__
|
||||
#endif
|
||||
#undef cm_no__attribute__
|
||||
|
||||
|
@ -11,7 +11,9 @@
|
||||
|
||||
#include "ui_AddCacheEntry.h"
|
||||
|
||||
class AddCacheEntry : public QWidget, public Ui::AddCacheEntry
|
||||
class AddCacheEntry
|
||||
: public QWidget
|
||||
, public Ui::AddCacheEntry
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -27,9 +27,10 @@ static const char* cmDocumentationName[][2] = { { nullptr,
|
||||
{ nullptr, nullptr } };
|
||||
|
||||
static const char* cmDocumentationUsage[][2] = {
|
||||
{ nullptr, " cmake-gui [options]\n"
|
||||
" cmake-gui [options] <path-to-source>\n"
|
||||
" cmake-gui [options] <path-to-existing-build>" },
|
||||
{ nullptr,
|
||||
" cmake-gui [options]\n"
|
||||
" cmake-gui [options] <path-to-source>\n"
|
||||
" cmake-gui [options] <path-to-existing-build>" },
|
||||
{ nullptr, nullptr }
|
||||
};
|
||||
|
||||
@ -192,10 +193,10 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#include "cm_sys_stat.h"
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
# include "cm_sys_stat.h"
|
||||
# include <errno.h>
|
||||
# include <string.h>
|
||||
# include <unistd.h>
|
||||
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
|
||||
{
|
||||
if (tool.empty()) {
|
||||
|
@ -842,7 +842,7 @@ void CMakeSetupDialog::doAbout()
|
||||
"Qt is licensed under terms of the GNU LGPLv" USE_LGPL ", available at:\n"
|
||||
" \"%3\""
|
||||
#endif
|
||||
);
|
||||
);
|
||||
msg = msg.arg(cmVersion::GetCMakeVersion());
|
||||
msg = msg.arg(qVersion());
|
||||
#ifdef USE_LGPL
|
||||
@ -989,8 +989,9 @@ void CMakeSetupDialog::removeSelectedCacheEntries()
|
||||
void CMakeSetupDialog::selectionChanged()
|
||||
{
|
||||
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
|
||||
if (idxs.count() && (this->CurrentState == ReadyConfigure ||
|
||||
this->CurrentState == ReadyGenerate)) {
|
||||
if (idxs.count() &&
|
||||
(this->CurrentState == ReadyConfigure ||
|
||||
this->CurrentState == ReadyGenerate)) {
|
||||
this->RemoveEntry->setEnabled(true);
|
||||
} else {
|
||||
this->RemoveEntry->setEnabled(false);
|
||||
|
@ -16,7 +16,9 @@ class QProgressBar;
|
||||
class QToolButton;
|
||||
|
||||
/// Qt user interface for CMake
|
||||
class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog
|
||||
class CMakeSetupDialog
|
||||
: public QMainWindow
|
||||
, public Ui::CMakeSetupDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -9,7 +9,9 @@
|
||||
|
||||
#include <ui_Compilers.h>
|
||||
|
||||
class Compilers : public QWidget, public Ui::Compilers
|
||||
class Compilers
|
||||
: public QWidget
|
||||
, public Ui::Compilers
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -63,7 +63,9 @@ private:
|
||||
};
|
||||
|
||||
//! the page that gives basic options for native compilers
|
||||
class NativeCompilerSetup : public QWizardPage, protected Ui::Compilers
|
||||
class NativeCompilerSetup
|
||||
: public QWizardPage
|
||||
, protected Ui::Compilers
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@ -83,7 +85,9 @@ public:
|
||||
};
|
||||
|
||||
//! the page that gives options for cross compilers
|
||||
class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler
|
||||
class CrossCompilerSetup
|
||||
: public QWizardPage
|
||||
, protected Ui::CrossCompiler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "qt_windows.h" // For SetErrorMode
|
||||
# include "qt_windows.h" // For SetErrorMode
|
||||
#endif
|
||||
|
||||
QCMake::QCMake(QObject* p)
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4127)
|
||||
#pragma warning(disable : 4512)
|
||||
# pragma warning(disable : 4127)
|
||||
# pragma warning(disable : 4512)
|
||||
#endif
|
||||
|
||||
#include <vector>
|
||||
|
@ -12,7 +12,9 @@
|
||||
class QString;
|
||||
class QWidget;
|
||||
|
||||
class RegexExplorer : public QDialog, public Ui::RegexExplorer
|
||||
class RegexExplorer
|
||||
: public QDialog
|
||||
, public Ui::RegexExplorer
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -12,7 +12,9 @@
|
||||
/**
|
||||
* Dialog window for setting the warning message related options.
|
||||
*/
|
||||
class WarningMessagesDialog : public QDialog, public Ui_MessagesDialog
|
||||
class WarningMessagesDialog
|
||||
: public QDialog
|
||||
, public Ui_MessagesDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -8,26 +8,26 @@
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
* Program: dumpexts.exe
|
||||
* Author: Gordon Chaffee
|
||||
*
|
||||
* History: The real functionality of this file was written by
|
||||
* Matt Pietrek in 1993 in his pedump utility. I've
|
||||
* modified it to dump the externals in a bunch of object
|
||||
* files to create a .def file.
|
||||
*
|
||||
* Notes: Visual C++ puts an underscore before each exported symbol.
|
||||
* This file removes them. I don't know if this is a problem
|
||||
* this other compilers. If _MSC_VER is defined,
|
||||
* the underscore is removed. If not, it isn't. To get a
|
||||
* full dump of an object file, use the -f option. This can
|
||||
* help determine the something that may be different with a
|
||||
* compiler other than Visual C++.
|
||||
* ======================================
|
||||
* Corrections (Axel 2006-04-04):
|
||||
* Conversion to C++. Mostly.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
* Program: dumpexts.exe
|
||||
* Author: Gordon Chaffee
|
||||
*
|
||||
* History: The real functionality of this file was written by
|
||||
* Matt Pietrek in 1993 in his pedump utility. I've
|
||||
* modified it to dump the externals in a bunch of object
|
||||
* files to create a .def file.
|
||||
*
|
||||
* Notes: Visual C++ puts an underscore before each exported symbol.
|
||||
* This file removes them. I don't know if this is a problem
|
||||
* this other compilers. If _MSC_VER is defined,
|
||||
* the underscore is removed. If not, it isn't. To get a
|
||||
* full dump of an object file, use the -f option. This can
|
||||
* help determine the something that may be different with a
|
||||
* compiler other than Visual C++.
|
||||
* ======================================
|
||||
* Corrections (Axel 2006-04-04):
|
||||
* Conversion to C++. Mostly.
|
||||
*
|
||||
* Extension (Axel 2006-03-15)
|
||||
* As soon as an object file contains an /EXPORT directive (which
|
||||
* is generated by the compiler when a symbol is declared as
|
||||
@ -37,30 +37,31 @@
|
||||
* programmer).
|
||||
*
|
||||
* ======================================
|
||||
* ======================================
|
||||
* Corrections (Valery Fine 23/02/98):
|
||||
*
|
||||
* The "(vector) deleting destructor" MUST not be exported
|
||||
* To recognize it the following test are introduced:
|
||||
* "@@UAEPAXI@Z" scalar deleting dtor
|
||||
* "@@QAEPAXI@Z" vector deleting dtor
|
||||
* "AEPAXI@Z" vector deleting dtor with thunk adjustor
|
||||
* ======================================
|
||||
* Corrections (Valery Fine 12/02/97):
|
||||
*
|
||||
* It created a wrong EXPORTS for the global pointers and constants.
|
||||
* The Section Header has been involved to discover the missing information
|
||||
* Now the pointers are correctly supplied with "DATA" descriptor
|
||||
* the constants with no extra descriptor.
|
||||
*
|
||||
* Corrections (Valery Fine 16/09/96):
|
||||
*
|
||||
* It didn't work for C++ code with global variables and class definitions
|
||||
* The DumpExternalObject function has been introduced to generate .DEF file
|
||||
*
|
||||
* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
* ======================================
|
||||
* Corrections (Valery Fine 23/02/98):
|
||||
*
|
||||
* The "(vector) deleting destructor" MUST not be exported
|
||||
* To recognize it the following test are introduced:
|
||||
* "@@UAEPAXI@Z" scalar deleting dtor
|
||||
* "@@QAEPAXI@Z" vector deleting dtor
|
||||
* "AEPAXI@Z" vector deleting dtor with thunk adjustor
|
||||
* ======================================
|
||||
* Corrections (Valery Fine 12/02/97):
|
||||
*
|
||||
* It created a wrong EXPORTS for the global pointers and constants.
|
||||
* The Section Header has been involved to discover the missing information
|
||||
* Now the pointers are correctly supplied with "DATA" descriptor
|
||||
* the constants with no extra descriptor.
|
||||
*
|
||||
* Corrections (Valery Fine 16/09/96):
|
||||
*
|
||||
* It didn't work for C++ code with global variables and class definitions
|
||||
* The DumpExternalObject function has been introduced to generate .DEF
|
||||
*file
|
||||
*
|
||||
* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
#include "bindexplib.h"
|
||||
|
||||
#include "cmsys/Encoding.hxx"
|
||||
@ -69,19 +70,19 @@
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef IMAGE_FILE_MACHINE_ARM
|
||||
#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
|
||||
# define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
|
||||
#endif
|
||||
|
||||
#ifndef IMAGE_FILE_MACHINE_THUMB
|
||||
#define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian
|
||||
# define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian
|
||||
#endif
|
||||
|
||||
#ifndef IMAGE_FILE_MACHINE_ARMNT
|
||||
#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
|
||||
# define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian
|
||||
#endif
|
||||
|
||||
#ifndef IMAGE_FILE_MACHINE_ARM64
|
||||
#define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
|
||||
# define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
|
||||
#endif
|
||||
|
||||
typedef struct cmANON_OBJECT_HEADER_BIGOBJ
|
||||
@ -188,7 +189,7 @@ public:
|
||||
{
|
||||
this->ObjectImageHeader = ih;
|
||||
this->SymbolTable =
|
||||
(SymbolTableType*)((DWORD_PTR) this->ObjectImageHeader +
|
||||
(SymbolTableType*)((DWORD_PTR)this->ObjectImageHeader +
|
||||
this->ObjectImageHeader->PointerToSymbolTable);
|
||||
this->SectionHeaders = GetSectionHeaderOffset(this->ObjectImageHeader);
|
||||
this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
|
||||
@ -227,8 +228,8 @@ public:
|
||||
(pSymbolTable->Type == 0x20 || pSymbolTable->Type == 0x0)) {
|
||||
if (pSymbolTable->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) {
|
||||
/*
|
||||
* The name of the Function entry points
|
||||
*/
|
||||
* The name of the Function entry points
|
||||
*/
|
||||
if (pSymbolTable->N.Name.Short != 0) {
|
||||
symbol.clear();
|
||||
symbol.insert(0, (const char*)pSymbolTable->N.ShortName, 8);
|
||||
@ -282,8 +283,8 @@ public:
|
||||
}
|
||||
|
||||
/*
|
||||
* Take into account any aux symbols
|
||||
*/
|
||||
* Take into account any aux symbols
|
||||
*/
|
||||
i += pSymbolTable->NumberOfAuxSymbols;
|
||||
pSymbolTable += pSymbolTable->NumberOfAuxSymbols;
|
||||
pSymbolTable++;
|
||||
@ -345,11 +346,11 @@ bool DumpFile(const char* filename, std::set<std::string>& symbols,
|
||||
(imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) &&
|
||||
(imageHeader->Characteristics == 0)) {
|
||||
/*
|
||||
* The tests above are checking for IMAGE_FILE_HEADER.Machine
|
||||
* if it contains supported machine formats (currently ARM and x86)
|
||||
* and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
|
||||
* this is not linked COFF OBJ file;
|
||||
*/
|
||||
* The tests above are checking for IMAGE_FILE_HEADER.Machine
|
||||
* if it contains supported machine formats (currently ARM and x86)
|
||||
* and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
|
||||
* this is not linked COFF OBJ file;
|
||||
*/
|
||||
DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL> symbolDumper(
|
||||
(PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols,
|
||||
(imageHeader->Machine == IMAGE_FILE_MACHINE_I386));
|
||||
@ -360,8 +361,8 @@ bool DumpFile(const char* filename, std::set<std::string>& symbols,
|
||||
(cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase;
|
||||
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
|
||||
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
|
||||
symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
|
||||
dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
|
||||
symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
|
||||
dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
|
||||
symbolDumper.DumpObjFile();
|
||||
} else {
|
||||
printf("unrecognized file format in '%s'\n", filename);
|
||||
|
@ -211,8 +211,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
|
||||
if (!aliasedTarget) {
|
||||
std::ostringstream e;
|
||||
e << "cannot create ALIAS target \"" << libName << "\" because target \""
|
||||
<< aliasedName << "\" does not already "
|
||||
"exist.";
|
||||
<< aliasedName
|
||||
<< "\" does not already "
|
||||
"exist.";
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
@ -5,24 +5,24 @@
|
||||
#include "cm_uv.h"
|
||||
|
||||
#ifndef CMAKE_USE_SYSTEM_LIBUV
|
||||
#ifdef _WIN32
|
||||
#define CM_HAVE_CPU_AFFINITY
|
||||
#include <windows.h>
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
#define CM_HAVE_CPU_AFFINITY
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <pthread_np.h>
|
||||
#include <sys/cpuset.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if defined(__linux__)
|
||||
# ifdef _WIN32
|
||||
# define CM_HAVE_CPU_AFFINITY
|
||||
# include <windows.h>
|
||||
# elif defined(__linux__) || defined(__FreeBSD__)
|
||||
# define CM_HAVE_CPU_AFFINITY
|
||||
# include <pthread.h>
|
||||
# include <sched.h>
|
||||
# if defined(__FreeBSD__)
|
||||
# include <pthread_np.h>
|
||||
# include <sys/cpuset.h>
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
# if defined(__linux__)
|
||||
typedef cpu_set_t cm_cpuset_t;
|
||||
#else
|
||||
# else
|
||||
typedef cpuset_t cm_cpuset_t;
|
||||
#endif
|
||||
#endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace cmAffinity {
|
||||
@ -33,7 +33,7 @@ std::set<size_t> GetProcessorsAvailable()
|
||||
#ifdef CM_HAVE_CPU_AFFINITY
|
||||
int cpumask_size = uv_cpumask_size();
|
||||
if (cpumask_size > 0) {
|
||||
#ifdef _WIN32
|
||||
# ifdef _WIN32
|
||||
DWORD_PTR procmask;
|
||||
DWORD_PTR sysmask;
|
||||
if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask) !=
|
||||
@ -44,7 +44,7 @@ std::set<size_t> GetProcessorsAvailable()
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
# else
|
||||
cm_cpuset_t cpuset;
|
||||
CPU_ZERO(&cpuset); // NOLINT(clang-tidy)
|
||||
if (pthread_getaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) == 0) {
|
||||
@ -54,7 +54,7 @@ std::set<size_t> GetProcessorsAvailable()
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
return processorsAvailable;
|
||||
|
@ -375,9 +375,9 @@ using std::size;
|
||||
|
||||
// std::size backport from C++17.
|
||||
template <class C>
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
constexpr
|
||||
#endif
|
||||
# endif
|
||||
auto
|
||||
size(C const& c) -> decltype(c.size())
|
||||
{
|
||||
@ -385,9 +385,9 @@ constexpr
|
||||
}
|
||||
|
||||
template <typename T, size_t N>
|
||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||
constexpr
|
||||
#endif
|
||||
# endif
|
||||
std::size_t
|
||||
size(const T (&)[N]) throw()
|
||||
{
|
||||
@ -405,22 +405,22 @@ using std::cend;
|
||||
|
||||
// std::c{begin,end} backport from C++14
|
||||
template <class C>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
auto cbegin(C const& c)
|
||||
#else
|
||||
# else
|
||||
constexpr auto cbegin(C const& c) noexcept(noexcept(std::begin(c)))
|
||||
#endif
|
||||
# endif
|
||||
-> decltype(std::begin(c))
|
||||
{
|
||||
return std::begin(c);
|
||||
}
|
||||
|
||||
template <class C>
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
auto cend(C const& c)
|
||||
#else
|
||||
# else
|
||||
constexpr auto cend(C const& c) noexcept(noexcept(std::end(c)))
|
||||
#endif
|
||||
# endif
|
||||
-> decltype(std::end(c))
|
||||
{
|
||||
return std::end(c);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#ifndef __LA_SSIZE_T
|
||||
#define __LA_SSIZE_T la_ssize_t
|
||||
# define __LA_SSIZE_T la_ssize_t
|
||||
#endif
|
||||
|
||||
static std::string cm_archive_error_string(struct archive* a)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <string>
|
||||
|
||||
#if !defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#error "cmArchiveWrite not allowed during bootstrap build!"
|
||||
# error "cmArchiveWrite not allowed during bootstrap build!"
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
@ -28,6 +28,7 @@ public:
|
||||
void Clear() { this->IsValueSet = false; }
|
||||
bool IsSet() const { return this->IsValueSet; }
|
||||
T Get() const { return Value; }
|
||||
|
||||
private:
|
||||
T Value;
|
||||
bool IsValueSet;
|
||||
@ -41,6 +42,7 @@ class cmArchiveWrite
|
||||
{
|
||||
typedef void (cmArchiveWrite::*safe_bool)();
|
||||
void safe_bool_true() {}
|
||||
|
||||
public:
|
||||
/** Compression type. */
|
||||
enum Compress
|
||||
|
@ -8,12 +8,12 @@
|
||||
#include "cmsys/SystemInformation.hxx"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmGlobalVisualStudio15Generator.h"
|
||||
#include "cmSystemTools.h"
|
||||
#include "cmVSSetupHelper.h"
|
||||
#define HAVE_VS_SETUP_HELPER
|
||||
# include "cmAlgorithms.h"
|
||||
# include "cmGlobalGenerator.h"
|
||||
# include "cmGlobalVisualStudio15Generator.h"
|
||||
# include "cmSystemTools.h"
|
||||
# include "cmVSSetupHelper.h"
|
||||
# define HAVE_VS_SETUP_HELPER
|
||||
#endif
|
||||
|
||||
class cmExecutionStatus;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __QNX__
|
||||
#include <malloc.h> /* for malloc/free on QNX */
|
||||
# include <malloc.h> /* for malloc/free on QNX */
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
@ -395,9 +395,10 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared,
|
||||
for (i = 0; i < numSrcs; ++i) {
|
||||
srcs2.push_back(srcs[i]);
|
||||
}
|
||||
mf->AddLibrary(libname, (shared ? cmStateEnums::SHARED_LIBRARY
|
||||
: cmStateEnums::STATIC_LIBRARY),
|
||||
srcs2);
|
||||
mf->AddLibrary(
|
||||
libname,
|
||||
(shared ? cmStateEnums::SHARED_LIBRARY : cmStateEnums::STATIC_LIBRARY),
|
||||
srcs2);
|
||||
}
|
||||
|
||||
char CCONV* cmExpandVariablesInString(void* arg, const char* source,
|
||||
|
@ -19,9 +19,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
#define CCONV __cdecl
|
||||
# define CCONV __cdecl
|
||||
#else
|
||||
#define CCONV
|
||||
# define CCONV
|
||||
#endif
|
||||
/*=========================================================================
|
||||
this is the structure of function entry points that a plugin may call. This
|
||||
@ -161,9 +161,9 @@ typedef struct
|
||||
CM_PLUGIN_EXPORT should be used by plugins
|
||||
=========================================================================*/
|
||||
#ifdef _WIN32
|
||||
#define CM_PLUGIN_EXPORT __declspec(dllexport)
|
||||
# define CM_PLUGIN_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define CM_PLUGIN_EXPORT
|
||||
# define CM_PLUGIN_EXPORT
|
||||
#endif
|
||||
|
||||
/*=========================================================================
|
||||
|
@ -55,7 +55,7 @@
|
||||
#include "cmake.h"
|
||||
|
||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||
#include <be/kernel/OS.h> /* disable_debugger() API. */
|
||||
# include <be/kernel/OS.h> /* disable_debugger() API. */
|
||||
#endif
|
||||
|
||||
#define DEBUGOUT \
|
||||
@ -75,9 +75,10 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
|
||||
// curl_getdate no longer assumes the day is today
|
||||
sprintf(buf, "%d%02d%02d %s", lctime->tm_year + 1900, lctime->tm_mon + 1,
|
||||
lctime->tm_mday, str.c_str());
|
||||
cmCTestLog(this, OUTPUT, "Determine Nightly Start Time"
|
||||
<< std::endl
|
||||
<< " Specified time: " << str << std::endl);
|
||||
cmCTestLog(this, OUTPUT,
|
||||
"Determine Nightly Start Time" << std::endl
|
||||
<< " Specified time: " << str
|
||||
<< std::endl);
|
||||
// Convert the nightly start time to seconds. Since we are
|
||||
// providing only a time and a timezone, the current date of
|
||||
// the local machine is assumed. Consequently, nightlySeconds
|
||||
@ -99,16 +100,17 @@ struct tm* cmCTest::GetNightlyTime(std::string const& str, bool tomorrowtag)
|
||||
// time of the current open dashboard
|
||||
ntime -= dayLength;
|
||||
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
|
||||
cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime
|
||||
<< std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
" Future time, subtract day: " << ntime << std::endl);
|
||||
}
|
||||
while (tctime > (ntime + dayLength)) {
|
||||
ntime += dayLength;
|
||||
cmCTestLog(this, DEBUG, " Past time, add day: " << ntime << std::endl);
|
||||
}
|
||||
cmCTestLog(this, DEBUG, "nightlySeconds: " << ntime << std::endl);
|
||||
cmCTestLog(this, DEBUG, " Current time: " << tctime << " Nightly time: "
|
||||
<< ntime << std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
" Current time: " << tctime << " Nightly time: " << ntime
|
||||
<< std::endl);
|
||||
if (tomorrowtag) {
|
||||
cmCTestLog(this, OUTPUT, " Use future tag, Add a day" << std::endl);
|
||||
ntime += dayLength;
|
||||
@ -390,13 +392,14 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||
if (this->ProduceXML) {
|
||||
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||
cmCTestOptionalLog(
|
||||
this, OUTPUT, " Site: "
|
||||
<< this->GetCTestConfiguration("Site") << std::endl
|
||||
<< " Build name: "
|
||||
<< cmCTest::SafeBuildIdField(this->GetCTestConfiguration("BuildName"))
|
||||
<< std::endl,
|
||||
quiet);
|
||||
cmCTestOptionalLog(this, OUTPUT,
|
||||
" Site: "
|
||||
<< this->GetCTestConfiguration("Site") << std::endl
|
||||
<< " Build name: "
|
||||
<< cmCTest::SafeBuildIdField(
|
||||
this->GetCTestConfiguration("BuildName"))
|
||||
<< std::endl,
|
||||
quiet);
|
||||
cmCTestOptionalLog(this, DEBUG, "Produce XML is on" << std::endl, quiet);
|
||||
if (this->TestModel == cmCTest::NIGHTLY &&
|
||||
this->GetCTestConfiguration("NightlyStartTime").empty()) {
|
||||
@ -431,16 +434,16 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
std::string testingDir = this->BinaryDir + "/Testing";
|
||||
if (cmSystemTools::FileExists(testingDir)) {
|
||||
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "File "
|
||||
<< testingDir
|
||||
<< " is in the place of the testing directory"
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"File " << testingDir
|
||||
<< " is in the place of the testing directory"
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory "
|
||||
<< testingDir << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Cannot create directory " << testingDir << std::endl);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -518,9 +521,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
}
|
||||
ofs.close();
|
||||
if (nullptr == command) {
|
||||
cmCTestOptionalLog(this, OUTPUT, "Create new tag: "
|
||||
<< tag << " - " << this->GetTestModelString()
|
||||
<< std::endl,
|
||||
cmCTestOptionalLog(this, OUTPUT,
|
||||
"Create new tag: " << tag << " - "
|
||||
<< this->GetTestModelString()
|
||||
<< std::endl,
|
||||
quiet);
|
||||
}
|
||||
}
|
||||
@ -539,8 +543,9 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
}
|
||||
|
||||
if (tag.empty()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot read existing TAG file in "
|
||||
<< testingDir << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Cannot read existing TAG file in " << testingDir
|
||||
<< std::endl);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -558,24 +563,27 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
||||
|
||||
if (model != this->TestModel && model != cmCTest::UNKNOWN &&
|
||||
this->TestModel != cmCTest::UNKNOWN) {
|
||||
cmCTestOptionalLog(this, WARNING, "Model given in TAG does not match "
|
||||
"model given in ctest_start()"
|
||||
cmCTestOptionalLog(this, WARNING,
|
||||
"Model given in TAG does not match "
|
||||
"model given in ctest_start()"
|
||||
<< std::endl,
|
||||
quiet);
|
||||
}
|
||||
|
||||
if (!this->SpecificTrack.empty() && track != this->SpecificTrack) {
|
||||
cmCTestOptionalLog(this, WARNING, "Track given in TAG does not match "
|
||||
"track given in ctest_start()"
|
||||
cmCTestOptionalLog(this, WARNING,
|
||||
"Track given in TAG does not match "
|
||||
"track given in ctest_start()"
|
||||
<< std::endl,
|
||||
quiet);
|
||||
} else {
|
||||
this->SpecificTrack = track;
|
||||
}
|
||||
|
||||
cmCTestOptionalLog(this, OUTPUT, " Use existing tag: "
|
||||
<< tag << " - " << this->GetTestModelString()
|
||||
<< std::endl,
|
||||
cmCTestOptionalLog(this, OUTPUT,
|
||||
" Use existing tag: " << tag << " - "
|
||||
<< this->GetTestModelString()
|
||||
<< std::endl,
|
||||
quiet);
|
||||
}
|
||||
|
||||
@ -613,8 +621,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
}
|
||||
|
||||
if (!fname.empty()) {
|
||||
cmCTestOptionalLog(this, OUTPUT, " Reading ctest configuration file: "
|
||||
<< fname << std::endl,
|
||||
cmCTestOptionalLog(this, OUTPUT,
|
||||
" Reading ctest configuration file: " << fname
|
||||
<< std::endl,
|
||||
command->ShouldBeQuiet());
|
||||
bool readit = mf->ReadDependentFile(fname.c_str());
|
||||
if (!readit) {
|
||||
@ -629,7 +638,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
<< bld_dir_fname << std::endl,
|
||||
command->ShouldBeQuiet());
|
||||
cmCTestOptionalLog(
|
||||
this, WARNING, "Cannot locate CTest configuration: in SourceDirectory: "
|
||||
this, WARNING,
|
||||
"Cannot locate CTest configuration: in SourceDirectory: "
|
||||
<< src_dir_fname << std::endl,
|
||||
command->ShouldBeQuiet());
|
||||
}
|
||||
@ -645,7 +655,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
if (dartVersion) {
|
||||
this->DartVersion = atoi(dartVersion);
|
||||
if (this->DartVersion < 0) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Invalid Dart server version: "
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Invalid Dart server version: "
|
||||
<< dartVersion << ". Please specify the version number."
|
||||
<< std::endl);
|
||||
return false;
|
||||
@ -656,9 +667,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
if (!this->Initialize(bld_dir.c_str(), command)) {
|
||||
return false;
|
||||
}
|
||||
cmCTestOptionalLog(this, OUTPUT, " Use "
|
||||
<< this->GetTestModelString()
|
||||
<< " tag: " << this->GetCurrentTag() << std::endl,
|
||||
cmCTestOptionalLog(this, OUTPUT,
|
||||
" Use " << this->GetTestModelString() << " tag: "
|
||||
<< this->GetCurrentTag() << std::endl,
|
||||
command->ShouldBeQuiet());
|
||||
return true;
|
||||
}
|
||||
@ -677,13 +688,13 @@ bool cmCTest::UpdateCTestConfiguration()
|
||||
if (!cmSystemTools::FileExists(fileName)) {
|
||||
// No need to exit if we are not producing XML
|
||||
if (this->ProduceXML) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Cannot find file: " << fileName << std::endl);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" << fileName
|
||||
<< "\n");
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
"Parse Config file:" << fileName << "\n");
|
||||
// parse the dart test file
|
||||
cmsys::ifstream fin(fileName.c_str());
|
||||
|
||||
@ -774,8 +785,9 @@ bool cmCTest::SetTest(const char* ttype, bool report)
|
||||
return true;
|
||||
}
|
||||
if (report) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \""
|
||||
<< ttype << "\" yet..." << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Don't know about test \"" << ttype << "\" yet..."
|
||||
<< std::endl);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -793,23 +805,24 @@ bool cmCTest::OpenOutputFile(const std::string& path, const std::string& name,
|
||||
}
|
||||
if (cmSystemTools::FileExists(testingDir)) {
|
||||
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "File "
|
||||
<< testingDir << " is in the place of the testing directory"
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"File " << testingDir
|
||||
<< " is in the place of the testing directory"
|
||||
<< std::endl);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Cannot create directory " << testingDir << std::endl);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
std::string filename = testingDir + "/" + name;
|
||||
stream.Open(filename.c_str());
|
||||
if (!stream) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem opening file: " << filename << std::endl);
|
||||
return false;
|
||||
}
|
||||
if (compress) {
|
||||
@ -1048,9 +1061,10 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
int length;
|
||||
cmProcessOutput processOutput(encoding);
|
||||
std::string strdata;
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Each . represents "
|
||||
<< tick_len << " bytes of output" << std::endl
|
||||
<< " " << std::flush);
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
|
||||
" Each . represents " << tick_len << " bytes of output"
|
||||
<< std::endl
|
||||
<< " " << std::flush);
|
||||
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||
processOutput.DecodeText(data, length, strdata);
|
||||
for (char& cc : strdata) {
|
||||
@ -1084,8 +1098,9 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
ofs << cmCTestLogWrite(strdata.c_str(), strdata.size());
|
||||
}
|
||||
}
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Size of output: "
|
||||
<< int(double(output.size()) / 1024.0) << "K" << std::endl);
|
||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
|
||||
" Size of output: " << int(double(output.size()) / 1024.0) << "K"
|
||||
<< std::endl);
|
||||
|
||||
cmsysProcess_WaitForExit(cp, nullptr);
|
||||
|
||||
@ -1097,16 +1112,17 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
||||
"Command exited with the value: " << *retVal << std::endl);
|
||||
} else if (result == cmsysProcess_State_Exception) {
|
||||
*retVal = cmsysProcess_GetExitException(cp);
|
||||
cmCTestLog(this, WARNING, "There was an exception: " << *retVal
|
||||
<< std::endl);
|
||||
cmCTestLog(this, WARNING,
|
||||
"There was an exception: " << *retVal << std::endl);
|
||||
} else if (result == cmsysProcess_State_Expired) {
|
||||
cmCTestLog(this, WARNING, "There was a timeout" << std::endl);
|
||||
} else if (result == cmsysProcess_State_Error) {
|
||||
output += "\n*** ERROR executing: ";
|
||||
output += cmsysProcess_GetErrorString(cp);
|
||||
output += "\n***The build process failed.";
|
||||
cmCTestLog(this, ERROR_MESSAGE, "There was an error: "
|
||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"There was an error: " << cmsysProcess_GetErrorString(cp)
|
||||
<< std::endl);
|
||||
}
|
||||
|
||||
cmsysProcess_Delete(cp);
|
||||
@ -1142,7 +1158,8 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
||||
if (timeout <= cmDuration::zero()) {
|
||||
timeout = std::chrono::seconds(1);
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Test timeout computed to be: "
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
"Test timeout computed to be: "
|
||||
<< (timeout == cmCTest::MaxDuration()
|
||||
? std::string("infinite")
|
||||
: std::to_string(cmDurationTo<unsigned int>(timeout)))
|
||||
@ -1250,8 +1267,8 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
||||
if (output && tempOutput.begin() != tempOutput.end()) {
|
||||
output->append(&*tempOutput.begin(), tempOutput.size());
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed"
|
||||
<< std::endl);
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
"-- Process completed" << std::endl);
|
||||
|
||||
int result = cmsysProcess_GetState(cp);
|
||||
|
||||
@ -1270,16 +1287,18 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
||||
if (output) {
|
||||
*output += outerr;
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
|
||||
<< std::flush);
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
outerr << std::endl
|
||||
<< std::flush);
|
||||
} else if (result == cmsysProcess_State_Error) {
|
||||
std::string outerr = "\n*** ERROR executing: ";
|
||||
outerr += cmsysProcess_GetErrorString(cp);
|
||||
if (output) {
|
||||
*output += outerr;
|
||||
}
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
|
||||
<< std::flush);
|
||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
outerr << std::endl
|
||||
<< std::flush);
|
||||
}
|
||||
cmsysProcess_Delete(cp);
|
||||
|
||||
@ -1319,8 +1338,9 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
|
||||
void cmCTest::StartXML(cmXMLWriter& xml, bool append)
|
||||
{
|
||||
if (this->CurrentTag.empty()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Current Tag empty, this may mean"
|
||||
" NightlStartTime was not set correctly."
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Current Tag empty, this may mean"
|
||||
" NightlStartTime was not set correctly."
|
||||
<< std::endl);
|
||||
cmSystemTools::SetFatalErrorOccured();
|
||||
}
|
||||
@ -1489,8 +1509,9 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml,
|
||||
ifs.close();
|
||||
} else {
|
||||
xml.Content("Problem reading file: " + file + "\n");
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: "
|
||||
<< file << " while creating notes" << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading file: " << file << " while creating notes"
|
||||
<< std::endl);
|
||||
}
|
||||
xml.EndElement(); // Text
|
||||
xml.EndElement(); // Note
|
||||
@ -1539,8 +1560,9 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
|
||||
|
||||
if (!cmSystemTools::CreateTar(tarFile.c_str(), files,
|
||||
cmSystemTools::TarCompressGZip, false)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Error creating tar while "
|
||||
"encoding file: "
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Error creating tar while "
|
||||
"encoding file: "
|
||||
<< file << std::endl);
|
||||
return "";
|
||||
}
|
||||
@ -1552,11 +1574,12 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
|
||||
std::string cmCTest::Base64EncodeFile(std::string const& file)
|
||||
{
|
||||
size_t const len = cmSystemTools::FileLength(file);
|
||||
cmsys::ifstream ifs(file.c_str(), std::ios::in
|
||||
cmsys::ifstream ifs(file.c_str(),
|
||||
std::ios::in
|
||||
#ifdef _WIN32
|
||||
| std::ios::binary
|
||||
#endif
|
||||
);
|
||||
);
|
||||
std::vector<char> file_buffer(len + 1);
|
||||
ifs.read(&file_buffer[0], len);
|
||||
ifs.close();
|
||||
@ -1574,8 +1597,9 @@ bool cmCTest::SubmitExtraFiles(const VectorOfStrings& files)
|
||||
{
|
||||
for (cmsys::String const& file : files) {
|
||||
if (!cmSystemTools::FileExists(file)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
||||
<< file << " to submit." << std::endl;);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Cannot find extra file: " << file << " to submit."
|
||||
<< std::endl;);
|
||||
return false;
|
||||
}
|
||||
this->AddSubmitFile(PartExtraFiles, file.c_str());
|
||||
@ -1732,7 +1756,8 @@ void cmCTest::ErrorMessageUnknownDashDValue(std::string& val)
|
||||
"CTest -D called with incorrect option: " << val << std::endl);
|
||||
|
||||
cmCTestLog(
|
||||
this, ERROR_MESSAGE, "Available options are:"
|
||||
this, ERROR_MESSAGE,
|
||||
"Available options are:"
|
||||
<< std::endl
|
||||
<< " ctest -D Continuous" << std::endl
|
||||
<< " ctest -D Continuous(Start|Update|Configure|Build)" << std::endl
|
||||
@ -2191,9 +2216,11 @@ bool cmCTest::HandleTestActionArgument(const char* ctestExec, size_t& i,
|
||||
i++;
|
||||
if (!this->SetTest(args[i].c_str(), false)) {
|
||||
success = false;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -T called with incorrect option: "
|
||||
<< args[i] << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"CTest -T called with incorrect option: " << args[i]
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Available options are:"
|
||||
<< std::endl
|
||||
<< " " << ctestExec << " -T all" << std::endl
|
||||
<< " " << ctestExec << " -T start" << std::endl
|
||||
@ -2227,9 +2254,11 @@ bool cmCTest::HandleTestModelArgument(const char* ctestExec, size_t& i,
|
||||
this->SetTestModel(cmCTest::EXPERIMENTAL);
|
||||
} else {
|
||||
success = false;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -M called with incorrect option: "
|
||||
<< str << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"CTest -M called with incorrect option: " << str
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Available options are:"
|
||||
<< std::endl
|
||||
<< " " << ctestExec << " -M Continuous" << std::endl
|
||||
<< " " << ctestExec << " -M Experimental" << std::endl
|
||||
@ -2270,8 +2299,8 @@ int cmCTest::ExecuteTests()
|
||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||
if (!this->Initialize(cwd.c_str(), nullptr)) {
|
||||
res = 12;
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem initializing the dashboard." << std::endl);
|
||||
} else {
|
||||
res = this->ProcessSteps();
|
||||
}
|
||||
@ -2295,8 +2324,8 @@ int cmCTest::RunCMakeAndTest(std::string* output)
|
||||
cmDynamicLoader::FlushCache();
|
||||
#endif
|
||||
if (retv != 0) {
|
||||
cmCTestLog(this, DEBUG, "build and test failing returning: " << retv
|
||||
<< std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
"build and test failing returning: " << retv << std::endl);
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
@ -2351,22 +2380,25 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
||||
bool found = false;
|
||||
VectorOfStrings dirs;
|
||||
VectorOfStrings ndirs;
|
||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration directory: "
|
||||
<< dir << std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration directory: " << dir
|
||||
<< std::endl);
|
||||
|
||||
std::string fname = dir;
|
||||
fname += "/CTestCustom.cmake";
|
||||
cmCTestLog(this, DEBUG, "* Check for file: " << fname << std::endl);
|
||||
if (cmSystemTools::FileExists(fname)) {
|
||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||
<< fname << std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration file: " << fname
|
||||
<< std::endl);
|
||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||
cmSystemTools::ResetErrorOccuredFlag();
|
||||
|
||||
if (!mf->ReadListFile(fname.c_str()) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: "
|
||||
<< fname << std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Problem reading custom configuration: " << fname
|
||||
<< std::endl);
|
||||
}
|
||||
found = true;
|
||||
if (erroroc) {
|
||||
@ -2384,8 +2416,9 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
||||
std::vector<std::string>& files = gl.GetFiles();
|
||||
std::vector<std::string>::iterator fileIt;
|
||||
for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
|
||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
||||
<< *fileIt << std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration file: " << *fileIt
|
||||
<< std::endl);
|
||||
if (!mf->ReadListFile(fileIt->c_str()) ||
|
||||
cmSystemTools::GetErrorOccuredFlag()) {
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
@ -2398,9 +2431,10 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
||||
|
||||
if (found) {
|
||||
for (auto& handler : this->TestingHandlers) {
|
||||
cmCTestLog(
|
||||
this, DEBUG, "* Read custom CTest configuration vectors for handler: "
|
||||
<< handler.first << " (" << handler.second << ")" << std::endl);
|
||||
cmCTestLog(this, DEBUG,
|
||||
"* Read custom CTest configuration vectors for handler: "
|
||||
<< handler.first << " (" << handler.second << ")"
|
||||
<< std::endl);
|
||||
handler.second->PopulateCustomVectors(mf);
|
||||
}
|
||||
}
|
||||
@ -2502,7 +2536,8 @@ void cmCTest::EmptyCTestConfiguration()
|
||||
void cmCTest::SetCTestConfiguration(const char* name, const char* value,
|
||||
bool suppress)
|
||||
{
|
||||
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:"
|
||||
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||
"SetCTestConfiguration:"
|
||||
<< name << ":" << (value ? value : "(null)") << "\n",
|
||||
suppress);
|
||||
|
||||
@ -2889,8 +2924,8 @@ bool cmCTest::CompressString(std::string& str)
|
||||
ret = deflate(&strm, Z_FINISH);
|
||||
|
||||
if (ret != Z_STREAM_END) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression."
|
||||
<< std::endl);
|
||||
cmCTestLog(this, ERROR_MESSAGE,
|
||||
"Error during gzip compression." << std::endl);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,8 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
|
||||
cmSystemTools::ConvertToUnixSlashes(e.Value);
|
||||
}
|
||||
}
|
||||
e.SetProperty("HELPSTRING", helpString
|
||||
e.SetProperty("HELPSTRING",
|
||||
helpString
|
||||
? helpString
|
||||
: "(This variable does not exist and should not be used)");
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define HAVE_COMDEF_H
|
||||
# define HAVE_COMDEF_H
|
||||
#endif
|
||||
|
||||
// Just for this file:
|
||||
@ -16,39 +16,39 @@ static bool LogErrorsAsMessages;
|
||||
|
||||
#if defined(HAVE_COMDEF_H)
|
||||
|
||||
#include <comdef.h>
|
||||
# include <comdef.h>
|
||||
|
||||
// Copied from a correct comdef.h to avoid problems with deficient versions
|
||||
// of comdef.h that exist in the wild... Fixes issue #7533.
|
||||
//
|
||||
#ifdef _NATIVE_WCHAR_T_DEFINED
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "comsuppwd.lib")
|
||||
#else
|
||||
#pragma comment(lib, "comsuppw.lib")
|
||||
#endif
|
||||
#else
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "comsuppd.lib")
|
||||
#else
|
||||
#pragma comment(lib, "comsupp.lib")
|
||||
#endif
|
||||
#endif
|
||||
# ifdef _NATIVE_WCHAR_T_DEFINED
|
||||
# ifdef _DEBUG
|
||||
# pragma comment(lib, "comsuppwd.lib")
|
||||
# else
|
||||
# pragma comment(lib, "comsuppw.lib")
|
||||
# endif
|
||||
# else
|
||||
# ifdef _DEBUG
|
||||
# pragma comment(lib, "comsuppd.lib")
|
||||
# else
|
||||
# pragma comment(lib, "comsupp.lib")
|
||||
# endif
|
||||
# endif
|
||||
|
||||
///! Use ReportHRESULT to make a cmSystemTools::Message after calling
|
||||
///! a COM method that may have failed.
|
||||
#define ReportHRESULT(hr, context) \
|
||||
if (FAILED(hr)) { \
|
||||
if (LogErrorsAsMessages) { \
|
||||
std::ostringstream _hresult_oss; \
|
||||
_hresult_oss.flags(std::ios::hex); \
|
||||
_hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
|
||||
<< std::endl; \
|
||||
_hresult_oss.flags(std::ios::dec); \
|
||||
_hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
|
||||
cmSystemTools::Message(_hresult_oss.str().c_str()); \
|
||||
} \
|
||||
}
|
||||
# define ReportHRESULT(hr, context) \
|
||||
if (FAILED(hr)) { \
|
||||
if (LogErrorsAsMessages) { \
|
||||
std::ostringstream _hresult_oss; \
|
||||
_hresult_oss.flags(std::ios::hex); \
|
||||
_hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
|
||||
<< std::endl; \
|
||||
_hresult_oss.flags(std::ios::dec); \
|
||||
_hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
|
||||
cmSystemTools::Message(_hresult_oss.str().c_str()); \
|
||||
} \
|
||||
}
|
||||
|
||||
///! Using the given instance of Visual Studio, call the named macro
|
||||
HRESULT InstanceCallMacro(IDispatch* vsIDE, const std::string& macro,
|
||||
|
@ -98,6 +98,7 @@ public:
|
||||
/** Is there a keyword which should be skipped in
|
||||
the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */
|
||||
void SetIgnore(const char* ignore) { this->Ignore = ignore; }
|
||||
|
||||
private:
|
||||
std::vector<std::string> Vector;
|
||||
unsigned int DataStart;
|
||||
@ -118,6 +119,7 @@ public:
|
||||
/// Return the string
|
||||
const std::string& GetString() const { return this->String; }
|
||||
const char* GetCString() const { return this->String.c_str(); }
|
||||
|
||||
private:
|
||||
std::string String;
|
||||
unsigned int DataStart;
|
||||
@ -136,6 +138,7 @@ public:
|
||||
|
||||
/// Has it been enabled ?
|
||||
bool IsEnabled() const { return this->Enabled; }
|
||||
|
||||
private:
|
||||
bool Enabled;
|
||||
bool DoConsume(const std::string& arg, unsigned int index) override;
|
||||
@ -153,6 +156,7 @@ public:
|
||||
|
||||
/// Is it still enabled ?
|
||||
bool IsEnabled() const { return this->Enabled; }
|
||||
|
||||
private:
|
||||
bool Enabled;
|
||||
bool DoConsume(const std::string& arg, unsigned int index) override;
|
||||
|
@ -81,30 +81,30 @@
|
||||
#include "cmWhileCommand.h"
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
#include "cmAddCompileOptionsCommand.h"
|
||||
#include "cmAuxSourceDirectoryCommand.h"
|
||||
#include "cmBuildNameCommand.h"
|
||||
#include "cmCMakeHostSystemInformationCommand.h"
|
||||
#include "cmExportCommand.h"
|
||||
#include "cmExportLibraryDependenciesCommand.h"
|
||||
#include "cmFLTKWrapUICommand.h"
|
||||
#include "cmIncludeExternalMSProjectCommand.h"
|
||||
#include "cmInstallProgramsCommand.h"
|
||||
#include "cmLinkLibrariesCommand.h"
|
||||
#include "cmLoadCacheCommand.h"
|
||||
#include "cmLoadCommandCommand.h"
|
||||
#include "cmOutputRequiredFilesCommand.h"
|
||||
#include "cmQTWrapCPPCommand.h"
|
||||
#include "cmQTWrapUICommand.h"
|
||||
#include "cmRemoveCommand.h"
|
||||
#include "cmRemoveDefinitionsCommand.h"
|
||||
#include "cmSourceGroupCommand.h"
|
||||
#include "cmSubdirDependsCommand.h"
|
||||
#include "cmUseMangledMesaCommand.h"
|
||||
#include "cmUtilitySourceCommand.h"
|
||||
#include "cmVariableRequiresCommand.h"
|
||||
#include "cmVariableWatchCommand.h"
|
||||
#include "cmWriteFileCommand.h"
|
||||
# include "cmAddCompileOptionsCommand.h"
|
||||
# include "cmAuxSourceDirectoryCommand.h"
|
||||
# include "cmBuildNameCommand.h"
|
||||
# include "cmCMakeHostSystemInformationCommand.h"
|
||||
# include "cmExportCommand.h"
|
||||
# include "cmExportLibraryDependenciesCommand.h"
|
||||
# include "cmFLTKWrapUICommand.h"
|
||||
# include "cmIncludeExternalMSProjectCommand.h"
|
||||
# include "cmInstallProgramsCommand.h"
|
||||
# include "cmLinkLibrariesCommand.h"
|
||||
# include "cmLoadCacheCommand.h"
|
||||
# include "cmLoadCommandCommand.h"
|
||||
# include "cmOutputRequiredFilesCommand.h"
|
||||
# include "cmQTWrapCPPCommand.h"
|
||||
# include "cmQTWrapUICommand.h"
|
||||
# include "cmRemoveCommand.h"
|
||||
# include "cmRemoveDefinitionsCommand.h"
|
||||
# include "cmSourceGroupCommand.h"
|
||||
# include "cmSubdirDependsCommand.h"
|
||||
# include "cmUseMangledMesaCommand.h"
|
||||
# include "cmUtilitySourceCommand.h"
|
||||
# include "cmVariableRequiresCommand.h"
|
||||
# include "cmVariableWatchCommand.h"
|
||||
# include "cmWriteFileCommand.h"
|
||||
#endif
|
||||
|
||||
void GetScriptingCommands(cmState* state)
|
||||
@ -155,32 +155,39 @@ void GetScriptingCommands(cmState* state)
|
||||
state->AddBuiltinCommand("while", new cmWhileCommand);
|
||||
|
||||
state->AddUnexpectedCommand(
|
||||
"else", "An ELSE command was found outside of a proper "
|
||||
"IF ENDIF structure. Or its arguments did not match "
|
||||
"the opening IF command.");
|
||||
"else",
|
||||
"An ELSE command was found outside of a proper "
|
||||
"IF ENDIF structure. Or its arguments did not match "
|
||||
"the opening IF command.");
|
||||
state->AddUnexpectedCommand(
|
||||
"elseif", "An ELSEIF command was found outside of a proper "
|
||||
"IF ENDIF structure.");
|
||||
"elseif",
|
||||
"An ELSEIF command was found outside of a proper "
|
||||
"IF ENDIF structure.");
|
||||
state->AddUnexpectedCommand(
|
||||
"endforeach", "An ENDFOREACH command was found outside of a proper "
|
||||
"FOREACH ENDFOREACH structure. Or its arguments did "
|
||||
"not match the opening FOREACH command.");
|
||||
"endforeach",
|
||||
"An ENDFOREACH command was found outside of a proper "
|
||||
"FOREACH ENDFOREACH structure. Or its arguments did "
|
||||
"not match the opening FOREACH command.");
|
||||
state->AddUnexpectedCommand(
|
||||
"endfunction", "An ENDFUNCTION command was found outside of a proper "
|
||||
"FUNCTION ENDFUNCTION structure. Or its arguments did not "
|
||||
"match the opening FUNCTION command.");
|
||||
"endfunction",
|
||||
"An ENDFUNCTION command was found outside of a proper "
|
||||
"FUNCTION ENDFUNCTION structure. Or its arguments did not "
|
||||
"match the opening FUNCTION command.");
|
||||
state->AddUnexpectedCommand(
|
||||
"endif", "An ENDIF command was found outside of a proper "
|
||||
"IF ENDIF structure. Or its arguments did not match "
|
||||
"the opening IF command.");
|
||||
"endif",
|
||||
"An ENDIF command was found outside of a proper "
|
||||
"IF ENDIF structure. Or its arguments did not match "
|
||||
"the opening IF command.");
|
||||
state->AddUnexpectedCommand(
|
||||
"endmacro", "An ENDMACRO command was found outside of a proper "
|
||||
"MACRO ENDMACRO structure. Or its arguments did not "
|
||||
"match the opening MACRO command.");
|
||||
"endmacro",
|
||||
"An ENDMACRO command was found outside of a proper "
|
||||
"MACRO ENDMACRO structure. Or its arguments did not "
|
||||
"match the opening MACRO command.");
|
||||
state->AddUnexpectedCommand(
|
||||
"endwhile", "An ENDWHILE command was found outside of a proper "
|
||||
"WHILE ENDWHILE structure. Or its arguments did not "
|
||||
"match the opening WHILE command.");
|
||||
"endwhile",
|
||||
"An ENDWHILE command was found outside of a proper "
|
||||
"WHILE ENDWHILE structure. Or its arguments did not "
|
||||
"match the opening WHILE command.");
|
||||
|
||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||
state->AddBuiltinCommand("cmake_host_system_information",
|
||||
|
@ -149,7 +149,8 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories()
|
||||
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
|
||||
for (auto const& item : items) {
|
||||
cmGeneratorTarget const* linkee = item.Target;
|
||||
if (linkee && !linkee->IsImported()
|
||||
if (linkee &&
|
||||
!linkee->IsImported()
|
||||
// We can ignore the INTERFACE_LIBRARY items because
|
||||
// Target->GetLinkInformation already processed their
|
||||
// link interface and they don't have any output themselves.
|
||||
|
@ -239,8 +239,9 @@ cmComputeLinkDepends::Compute()
|
||||
|
||||
// Display the constraint graph.
|
||||
if (this->DebugMode) {
|
||||
fprintf(stderr, "---------------------------------------"
|
||||
"---------------------------------------\n");
|
||||
fprintf(stderr,
|
||||
"---------------------------------------"
|
||||
"---------------------------------------\n");
|
||||
fprintf(stderr, "Link dependency analysis for target %s, config %s\n",
|
||||
this->Target->GetName().c_str(),
|
||||
this->HasConfig ? this->Config.c_str() : "noconfig");
|
||||
|
@ -241,13 +241,12 @@ because this need be done only for shared libraries without soname-s.
|
||||
cmComputeLinkInformation::cmComputeLinkInformation(
|
||||
const cmGeneratorTarget* target, const std::string& config)
|
||||
// Store context information.
|
||||
: Target(target),
|
||||
Makefile(target->Target->GetMakefile()),
|
||||
GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
|
||||
CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
|
||||
// The configuration being linked.
|
||||
,
|
||||
Config(config)
|
||||
: Target(target)
|
||||
, Makefile(target->Target->GetMakefile())
|
||||
, GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator())
|
||||
, CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
|
||||
// The configuration being linked.
|
||||
, Config(config)
|
||||
{
|
||||
// Check whether to recognize OpenBSD-style library versioned names.
|
||||
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
std::string GetRPathLinkString() const;
|
||||
|
||||
std::string GetConfig() const { return this->Config; }
|
||||
|
||||
private:
|
||||
void AddItem(std::string const& item, const cmGeneratorTarget* tgt);
|
||||
void AddSharedDepItem(std::string const& item, cmGeneratorTarget const* tgt);
|
||||
|
@ -82,17 +82,20 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) ==
|
||||
0) {
|
||||
targetType = cmStateEnums::EXECUTABLE;
|
||||
} else if (strcmp(tt, cmState::GetTargetTypeName(
|
||||
cmStateEnums::STATIC_LIBRARY)) == 0) {
|
||||
} else if (strcmp(tt,
|
||||
cmState::GetTargetTypeName(
|
||||
cmStateEnums::STATIC_LIBRARY)) == 0) {
|
||||
targetType = cmStateEnums::STATIC_LIBRARY;
|
||||
} else {
|
||||
this->Makefile->IssueMessage(
|
||||
cmake::FATAL_ERROR, std::string("Invalid value '") + tt +
|
||||
cmake::FATAL_ERROR,
|
||||
std::string("Invalid value '") + tt +
|
||||
"' for "
|
||||
"CMAKE_TRY_COMPILE_TARGET_TYPE. Only "
|
||||
"'" +
|
||||
cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and "
|
||||
"'" +
|
||||
cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) +
|
||||
"' and "
|
||||
"'" +
|
||||
cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) +
|
||||
"' "
|
||||
"are allowed.");
|
||||
@ -224,8 +227,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
cmake::FATAL_ERROR,
|
||||
"Only libraries may be used as try_compile or try_run IMPORTED "
|
||||
"LINK_LIBRARIES. Got " +
|
||||
std::string(tgt->GetName()) + " of "
|
||||
"type " +
|
||||
std::string(tgt->GetName()) +
|
||||
" of "
|
||||
"type " +
|
||||
cmState::GetTargetTypeName(tgt->GetType()) + ".");
|
||||
return -1;
|
||||
}
|
||||
@ -487,8 +491,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
const char* flags = this->Makefile->GetDefinition(langFlags);
|
||||
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(),
|
||||
cmOutputConverter::EscapeForCMake(flags ? flags : "").c_str());
|
||||
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
||||
" ${COMPILE_DEFINITIONS}\")\n",
|
||||
fprintf(fout,
|
||||
"set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
||||
" ${COMPILE_DEFINITIONS}\")\n",
|
||||
li.c_str(), li.c_str());
|
||||
}
|
||||
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0066)) {
|
||||
@ -563,8 +568,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
||||
}
|
||||
break;
|
||||
}
|
||||
fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
|
||||
" ${EXE_LINKER_FLAGS}\")\n");
|
||||
fprintf(fout,
|
||||
"set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
|
||||
" ${EXE_LINKER_FLAGS}\")\n");
|
||||
fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n");
|
||||
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
|
||||
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
|
||||
!defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
|
||||
#define CMAKE_FIND_CAFILE
|
||||
#include "cmSystemTools.h"
|
||||
# define CMAKE_FIND_CAFILE
|
||||
# include "cmSystemTools.h"
|
||||
#endif
|
||||
|
||||
// curl versions before 7.21.5 did not provide this error code
|
||||
#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
|
||||
#define CURLE_NOT_BUILT_IN 4
|
||||
# define CURLE_NOT_BUILT_IN 4
|
||||
#endif
|
||||
|
||||
#define check_curl_result(result, errstr) \
|
||||
@ -30,28 +30,28 @@ std::string cmCurlSetCAInfo(::CURL* curl, const char* cafile)
|
||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||
}
|
||||
#ifdef CMAKE_FIND_CAFILE
|
||||
#define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
# define CMAKE_CAFILE_FEDORA "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {
|
||||
::CURLcode res =
|
||||
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_FEDORA);
|
||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||
}
|
||||
#undef CMAKE_CAFILE_FEDORA
|
||||
# undef CMAKE_CAFILE_FEDORA
|
||||
else {
|
||||
#define CMAKE_CAFILE_COMMON "/etc/ssl/certs/ca-certificates.crt"
|
||||
# define CMAKE_CAFILE_COMMON "/etc/ssl/certs/ca-certificates.crt"
|
||||
if (cmSystemTools::FileExists(CMAKE_CAFILE_COMMON, true)) {
|
||||
::CURLcode res =
|
||||
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_COMMON);
|
||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||
}
|
||||
#undef CMAKE_CAFILE_COMMON
|
||||
#define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
|
||||
# undef CMAKE_CAFILE_COMMON
|
||||
# define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
|
||||
if (cmSystemTools::FileIsDirectory(CMAKE_CAPATH_COMMON)) {
|
||||
::CURLcode res =
|
||||
::curl_easy_setopt(curl, CURLOPT_CAPATH, CMAKE_CAPATH_COMMON);
|
||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
|
||||
}
|
||||
#undef CMAKE_CAPATH_COMMON
|
||||
# undef CMAKE_CAPATH_COMMON
|
||||
}
|
||||
#endif
|
||||
return e;
|
||||
|
@ -13,39 +13,39 @@
|
||||
|
||||
// Include the ELF format information system header.
|
||||
#if defined(__OpenBSD__)
|
||||
#include <elf_abi.h>
|
||||
#include <stdint.h>
|
||||
# include <elf_abi.h>
|
||||
# include <stdint.h>
|
||||
#elif defined(__HAIKU__)
|
||||
#include <elf32.h>
|
||||
#include <elf64.h>
|
||||
# include <elf32.h>
|
||||
# include <elf64.h>
|
||||
typedef struct Elf32_Ehdr Elf32_Ehdr;
|
||||
typedef struct Elf32_Shdr Elf32_Shdr;
|
||||
typedef struct Elf32_Sym Elf32_Sym;
|
||||
typedef struct Elf32_Rel Elf32_Rel;
|
||||
typedef struct Elf32_Rela Elf32_Rela;
|
||||
#define ELFMAG0 0x7F
|
||||
#define ELFMAG1 'E'
|
||||
#define ELFMAG2 'L'
|
||||
#define ELFMAG3 'F'
|
||||
#define ET_NONE 0
|
||||
#define ET_REL 1
|
||||
#define ET_EXEC 2
|
||||
#define ET_DYN 3
|
||||
#define ET_CORE 4
|
||||
#define EM_386 3
|
||||
#define EM_SPARC 2
|
||||
#define EM_PPC 20
|
||||
# define ELFMAG0 0x7F
|
||||
# define ELFMAG1 'E'
|
||||
# define ELFMAG2 'L'
|
||||
# define ELFMAG3 'F'
|
||||
# define ET_NONE 0
|
||||
# define ET_REL 1
|
||||
# define ET_EXEC 2
|
||||
# define ET_DYN 3
|
||||
# define ET_CORE 4
|
||||
# define EM_386 3
|
||||
# define EM_SPARC 2
|
||||
# define EM_PPC 20
|
||||
#else
|
||||
#include <elf.h>
|
||||
# include <elf.h>
|
||||
#endif
|
||||
#if defined(__sun)
|
||||
#include <sys/link.h> // For dynamic section information
|
||||
# include <sys/link.h> // For dynamic section information
|
||||
#endif
|
||||
#ifdef _SCO_DS
|
||||
#include <link.h> // For DT_SONAME etc.
|
||||
# include <link.h> // For DT_SONAME etc.
|
||||
#endif
|
||||
#ifndef DT_RUNPATH
|
||||
#define DT_RUNPATH 29
|
||||
# define DT_RUNPATH 29
|
||||
#endif
|
||||
|
||||
// Low-level byte swapping implementation.
|
||||
@ -162,6 +162,7 @@ public:
|
||||
|
||||
// Return the recorded ELF type.
|
||||
cmELF::FileType GetFileType() const { return this->ELFType; }
|
||||
|
||||
protected:
|
||||
// Data common to all ELF class implementations.
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#if !defined(CMAKE_USE_ELF_PARSER)
|
||||
#error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
|
||||
# error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled."
|
||||
#endif
|
||||
|
||||
class cmELFInternal;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user