mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-12 23:43:59 +03: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:
1 parent
12fed3edb1
commit
d7204e649e
445 files changed
+3734
-3181
No files matched your search
@@ -1,9 +1,9 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#error "A C++ compiler has been selected for C."
|
# error "A C++ compiler has been selected for C."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CLASSIC_C__
|
#ifdef __CLASSIC_C__
|
||||||
#define const
|
# define const
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "CMakeCompilerABI.h"
|
#include "CMakeCompilerABI.h"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __CUDACC__
|
#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
|
#endif
|
||||||
|
|
||||||
#include "CMakeCompilerABI.h"
|
#include "CMakeCompilerABI.h"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
#error "A C compiler has been selected for C++."
|
# error "A C compiler has been selected for C++."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "CMakeCompilerABI.h"
|
#include "CMakeCompilerABI.h"
|
||||||
|
|||||||
@@ -11,27 +11,27 @@ const char info_sizeof_dptr[] = {
|
|||||||
|
|
||||||
/* Application Binary Interface. */
|
/* Application Binary Interface. */
|
||||||
#if defined(__sgi) && defined(_ABIO32)
|
#if defined(__sgi) && defined(_ABIO32)
|
||||||
#define ABI_ID "ELF O32"
|
# define ABI_ID "ELF O32"
|
||||||
#elif defined(__sgi) && defined(_ABIN32)
|
#elif defined(__sgi) && defined(_ABIN32)
|
||||||
#define ABI_ID "ELF N32"
|
# define ABI_ID "ELF N32"
|
||||||
#elif defined(__sgi) && defined(_ABI64)
|
#elif defined(__sgi) && defined(_ABI64)
|
||||||
#define ABI_ID "ELF 64"
|
# define ABI_ID "ELF 64"
|
||||||
|
|
||||||
/* Check for (some) ARM ABIs.
|
/* Check for (some) ARM ABIs.
|
||||||
* See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
|
* See e.g. http://wiki.debian.org/ArmEabiPort for some information on this. */
|
||||||
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARM_EABI__)
|
#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__)
|
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEB__)
|
||||||
#define ABI_ID "ELF ARM"
|
# define ABI_ID "ELF ARM"
|
||||||
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
|
#elif defined(__GNU__) && defined(__ELF__) && defined(__ARMEL__)
|
||||||
#define ABI_ID "ELF ARM"
|
# define ABI_ID "ELF ARM"
|
||||||
|
|
||||||
#elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
|
#elif defined(__linux__) && defined(__ELF__) && defined(__amd64__) && \
|
||||||
defined(__ILP32__)
|
defined(__ILP32__)
|
||||||
#define ABI_ID "ELF X32"
|
# define ABI_ID "ELF X32"
|
||||||
|
|
||||||
#elif defined(__ELF__)
|
#elif defined(__ELF__)
|
||||||
#define ABI_ID "ELF"
|
# define ABI_ID "ELF"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ABI_ID)
|
#if defined(ABI_ID)
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#ifdef CHECK_FUNCTION_EXISTS
|
#ifdef CHECK_FUNCTION_EXISTS
|
||||||
|
|
||||||
#ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
#endif
|
# endif
|
||||||
char
|
char
|
||||||
CHECK_FUNCTION_EXISTS(void);
|
CHECK_FUNCTION_EXISTS(void);
|
||||||
#ifdef __CLASSIC_C__
|
# ifdef __CLASSIC_C__
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int ac;
|
int ac;
|
||||||
char* av[];
|
char* av[];
|
||||||
#else
|
# else
|
||||||
int main(int ac, char* av[])
|
int main(int ac, char* av[])
|
||||||
{
|
{
|
||||||
#endif
|
# endif
|
||||||
CHECK_FUNCTION_EXISTS();
|
CHECK_FUNCTION_EXISTS();
|
||||||
if (ac > 1000) {
|
if (ac > 1000) {
|
||||||
return *av[0];
|
return *av[0];
|
||||||
@@ -23,6 +23,6 @@ int main(int ac, char* av[])
|
|||||||
|
|
||||||
#else /* CHECK_FUNCTION_EXISTS */
|
#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 */
|
#endif /* CHECK_FUNCTION_EXISTS */
|
||||||
@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
extern int CHECK_VARIABLE_EXISTS;
|
extern int CHECK_VARIABLE_EXISTS;
|
||||||
|
|
||||||
#ifdef __CLASSIC_C__
|
# ifdef __CLASSIC_C__
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int ac;
|
int ac;
|
||||||
char* av[];
|
char* av[];
|
||||||
#else
|
# else
|
||||||
int main(int ac, char* av[])
|
int main(int ac, char* av[])
|
||||||
{
|
{
|
||||||
#endif
|
# endif
|
||||||
if (ac > 1000) {
|
if (ac > 1000) {
|
||||||
return *av[0];
|
return *av[0];
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,6 @@ int main(int ac, char* av[])
|
|||||||
|
|
||||||
#else /* CHECK_VARIABLE_EXISTS */
|
#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 */
|
#endif /* CHECK_VARIABLE_EXISTS */
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <cstdio>
|
# include <cstdio>
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#include <mpi.h>
|
#include <mpi.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <cstdio>
|
# include <cstdio>
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
# include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
||||||
@@ -21,11 +21,11 @@ const char mpiver_str[] = { 'I', 'N',
|
|||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
#if defined(MPI_VERSION) && defined(MPI_SUBVERSION)
|
||||||
#ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
std::puts(mpiver_str);
|
std::puts(mpiver_str);
|
||||||
#else
|
# else
|
||||||
puts(mpiver_str);
|
puts(mpiver_str);
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef TEST_MPI_MPICXX
|
#ifdef TEST_MPI_MPICXX
|
||||||
MPI::MPI_Init(&argc, &argv);
|
MPI::MPI_Init(&argc, &argv);
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
ifwCmd += " --repository " + rd;
|
ifwCmd += " --repository " + rd;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
cmCPackIFWLogger(WARNING,
|
||||||
|
"The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||||
<< "variable is set, but content will be skipped, "
|
<< "variable is set, but content will be skipped, "
|
||||||
<< "because this feature available only since "
|
<< "because this feature available only since "
|
||||||
<< "QtIFW 3.1. Please update your QtIFW instance."
|
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||||
@@ -93,7 +94,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
ofs << "# Run command: " << ifwCmd << std::endl
|
ofs << "# Run command: " << ifwCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackIFWLogger(ERROR, "Problem running IFW command: "
|
cmCPackIFWLogger(ERROR,
|
||||||
|
"Problem running IFW command: "
|
||||||
<< ifwCmd << std::endl
|
<< ifwCmd << std::endl
|
||||||
<< "Please check " << ifwTmpFile << " for errors"
|
<< "Please check " << ifwTmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -102,15 +104,16 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
|
|
||||||
if (!this->Repository.RepositoryUpdate.empty() &&
|
if (!this->Repository.RepositoryUpdate.empty() &&
|
||||||
!this->Repository.PatchUpdatesXml()) {
|
!this->Repository.PatchUpdatesXml()) {
|
||||||
cmCPackIFWLogger(WARNING, "Problem patch IFW \"Updates\" "
|
cmCPackIFWLogger(WARNING,
|
||||||
|
"Problem patch IFW \"Updates\" "
|
||||||
<< "file: "
|
<< "file: "
|
||||||
<< this->toplevel + "/repository/Updates.xml"
|
<< this->toplevel + "/repository/Updates.xml"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCPackIFWLogger(OUTPUT, "- repository: " << this->toplevel
|
cmCPackIFWLogger(OUTPUT,
|
||||||
<< "/repository generated"
|
"- repository: " << this->toplevel
|
||||||
<< std::endl);
|
<< "/repository generated" << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run binary creator
|
// Run binary creator
|
||||||
@@ -145,7 +148,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
ifwCmd += " --repository " + rd;
|
ifwCmd += " --repository " + rd;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCPackIFWLogger(WARNING, "The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
cmCPackIFWLogger(WARNING,
|
||||||
|
"The \"CPACK_IFW_REPOSITORIES_DIRECTORIES\" "
|
||||||
<< "variable is set, but content will be skipped, "
|
<< "variable is set, but content will be skipped, "
|
||||||
<< "because this feature available only since "
|
<< "because this feature available only since "
|
||||||
<< "QtIFW 3.1. Please update your QtIFW instance."
|
<< "QtIFW 3.1. Please update your QtIFW instance."
|
||||||
@@ -203,7 +207,8 @@ int cmCPackIFWGenerator::PackageFiles()
|
|||||||
ofs << "# Run command: " << ifwCmd << std::endl
|
ofs << "# Run command: " << ifwCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackIFWLogger(ERROR, "Problem running IFW command: "
|
cmCPackIFWLogger(ERROR,
|
||||||
|
"Problem running IFW command: "
|
||||||
<< ifwCmd << std::endl
|
<< ifwCmd << std::endl
|
||||||
<< "Please check " << ifwTmpFile << " for errors"
|
<< "Please check " << ifwTmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -257,8 +262,9 @@ int cmCPackIFWGenerator::InitializeInternal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->BinCreator.empty()) {
|
if (this->BinCreator.empty()) {
|
||||||
cmCPackIFWLogger(ERROR, "Cannot find QtIFW compiler \"binarycreator\": "
|
cmCPackIFWLogger(ERROR,
|
||||||
"likely it is not installed, or not in your PATH"
|
"Cannot find QtIFW compiler \"binarycreator\": "
|
||||||
|
"likely it is not installed, or not in your PATH"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -415,7 +421,8 @@ cmCPackComponent* cmCPackIFWGenerator::GetComponent(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this->Packages.erase(name);
|
this->Packages.erase(name);
|
||||||
cmCPackIFWLogger(ERROR, "Cannot configure package \""
|
cmCPackIFWLogger(ERROR,
|
||||||
|
"Cannot configure package \""
|
||||||
<< name << "\" for component \"" << component->Name
|
<< name << "\" for component \"" << component->Name
|
||||||
<< "\"" << std::endl);
|
<< "\"" << std::endl);
|
||||||
}
|
}
|
||||||
@@ -450,7 +457,8 @@ cmCPackComponentGroup* cmCPackIFWGenerator::GetComponentGroup(
|
|||||||
this->BinaryPackages.insert(package);
|
this->BinaryPackages.insert(package);
|
||||||
} else {
|
} else {
|
||||||
this->Packages.erase(name);
|
this->Packages.erase(name);
|
||||||
cmCPackIFWLogger(ERROR, "Cannot configure package \""
|
cmCPackIFWLogger(ERROR,
|
||||||
|
"Cannot configure package \""
|
||||||
<< name << "\" for component group \"" << group->Name
|
<< name << "\" for component group \"" << group->Name
|
||||||
<< "\"" << std::endl);
|
<< "\"" << std::endl);
|
||||||
}
|
}
|
||||||
@@ -596,7 +604,8 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
|
|||||||
} else {
|
} else {
|
||||||
this->Repositories.erase(repositoryName);
|
this->Repositories.erase(repositoryName);
|
||||||
repository = nullptr;
|
repository = nullptr;
|
||||||
cmCPackIFWLogger(WARNING, "Invalid repository \""
|
cmCPackIFWLogger(WARNING,
|
||||||
|
"Invalid repository \""
|
||||||
<< repositoryName << "\""
|
<< repositoryName << "\""
|
||||||
<< " configuration. Repository will be skipped."
|
<< " configuration. Repository will be skipped."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
|||||||
@@ -22,7 +22,9 @@
|
|||||||
*
|
*
|
||||||
* http://qt-project.org/doc/qtinstallerframework/index.html
|
* http://qt-project.org/doc/qtinstallerframework/index.html
|
||||||
*/
|
*/
|
||||||
class cmCPackIFWGenerator : public cmCPackGenerator, public cmCPackIFWCommon
|
class cmCPackIFWGenerator
|
||||||
|
: public cmCPackGenerator
|
||||||
|
, public cmCPackIFWCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator);
|
cmCPackTypeMacro(cmCPackIFWGenerator, cmCPackGenerator);
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ void cmCPackIFWInstaller::printSkippedOptionWarning(
|
|||||||
const std::string& optionName, const std::string& optionValue)
|
const std::string& optionName, const std::string& optionValue)
|
||||||
{
|
{
|
||||||
cmCPackIFWLogger(
|
cmCPackIFWLogger(
|
||||||
WARNING, "Option "
|
WARNING,
|
||||||
|
"Option "
|
||||||
<< optionName << " is set to \"" << optionValue
|
<< optionName << " is set to \"" << optionValue
|
||||||
<< "\" but will be skipped because the specified file does not exist."
|
<< "\" but will be skipped because the specified file does not exist."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -146,7 +147,8 @@ void cmCPackIFWInstaller::ConfigureFromOptions()
|
|||||||
if (this->WizardStyle != "Modern" && this->WizardStyle != "Aero" &&
|
if (this->WizardStyle != "Modern" && this->WizardStyle != "Aero" &&
|
||||||
this->WizardStyle != "Mac" && this->WizardStyle != "Classic") {
|
this->WizardStyle != "Mac" && this->WizardStyle != "Classic") {
|
||||||
cmCPackIFWLogger(
|
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."
|
<< option << "\". Expected values are: Modern, Aero, Mac, Classic."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@@ -469,7 +471,8 @@ void cmCPackIFWInstaller::GenerateInstallerFile()
|
|||||||
cmsys::SystemTools::CopyFileIfDifferent(this->Resources[i], path);
|
cmsys::SystemTools::CopyFileIfDifferent(this->Resources[i], path);
|
||||||
resources.push_back(std::move(name));
|
resources.push_back(std::move(name));
|
||||||
} else {
|
} else {
|
||||||
cmCPackIFWLogger(WARNING, "Can't copy resources from \""
|
cmCPackIFWLogger(WARNING,
|
||||||
|
"Can't copy resources from \""
|
||||||
<< this->Resources[i]
|
<< this->Resources[i]
|
||||||
<< "\". Resource will be skipped." << std::endl);
|
<< "\". Resource will be skipped." << std::endl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -226,7 +226,8 @@ int cmCPackIFWPackage::ConfigureFromComponent(cmCPackComponent* component)
|
|||||||
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
||||||
this->SortingPriority = option;
|
this->SortingPriority = option;
|
||||||
cmCPackIFWLogger(
|
cmCPackIFWLogger(
|
||||||
WARNING, "The \"PRIORITY\" option is set "
|
WARNING,
|
||||||
|
"The \"PRIORITY\" option is set "
|
||||||
<< "for component \"" << component->Name << "\", but there option is "
|
<< "for component \"" << component->Name << "\", but there option is "
|
||||||
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -303,7 +304,8 @@ int cmCPackIFWPackage::ConfigureFromGroup(cmCPackComponentGroup* group)
|
|||||||
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
if (const char* option = this->GetOption(prefix + "PRIORITY")) {
|
||||||
this->SortingPriority = option;
|
this->SortingPriority = option;
|
||||||
cmCPackIFWLogger(
|
cmCPackIFWLogger(
|
||||||
WARNING, "The \"PRIORITY\" option is set "
|
WARNING,
|
||||||
|
"The \"PRIORITY\" option is set "
|
||||||
<< "for component group \"" << group->Name
|
<< "for component group \"" << group->Name
|
||||||
<< "\", but there option is "
|
<< "\", but there option is "
|
||||||
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
<< "deprecated. Please use \"SORTING_PRIORITY\" option instead."
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include <sys/cygwin.h>
|
# include <sys/cygwin.h>
|
||||||
std::string CMakeToWixPath(const std::string& cygpath)
|
std::string CMakeToWixPath(const std::string& cygpath)
|
||||||
{
|
{
|
||||||
std::vector<char> winpath_chars;
|
std::vector<char> winpath_chars;
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
#include "cmsys/SystemTools.hxx"
|
#include "cmsys/SystemTools.hxx"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <rpc.h> // for GUID generation (windows only)
|
# include <rpc.h> // for GUID generation (windows only)
|
||||||
#else
|
#else
|
||||||
#include <uuid/uuid.h> // for GUID generation (libuuid)
|
# include <uuid/uuid.h> // for GUID generation (libuuid)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "cmCMakeToWixPath.h"
|
#include "cmCMakeToWixPath.h"
|
||||||
@@ -55,8 +55,8 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
|
|||||||
{
|
{
|
||||||
std::string logFileName = this->CPackTopLevel + "/wix.log";
|
std::string logFileName = this->CPackTopLevel + "/wix.log";
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Running WiX command: " << command
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Running WiX command: " << command << std::endl);
|
||||||
|
|
||||||
std::string output;
|
std::string output;
|
||||||
|
|
||||||
@@ -71,8 +71,9 @@ bool cmCPackWIXGenerator::RunWiXCommand(std::string const& command)
|
|||||||
logFile.close();
|
logFile.close();
|
||||||
|
|
||||||
if (!status || returnValue) {
|
if (!status || returnValue) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running WiX candle. "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Please check '"
|
"Problem running WiX candle. "
|
||||||
|
"Please check '"
|
||||||
<< logFileName << "' for errors." << std::endl);
|
<< logFileName << "' for errors." << std::endl);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -137,8 +138,8 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
|
|||||||
int cmCPackWIXGenerator::PackageFiles()
|
int cmCPackWIXGenerator::PackageFiles()
|
||||||
{
|
{
|
||||||
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) {
|
if (!PackageFilesImpl() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Fatal WiX Generator Error"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Fatal WiX Generator Error" << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,8 +149,8 @@ int cmCPackWIXGenerator::PackageFiles()
|
|||||||
bool cmCPackWIXGenerator::InitializeWiXConfiguration()
|
bool cmCPackWIXGenerator::InitializeWiXConfiguration()
|
||||||
{
|
{
|
||||||
if (!ReadListFile("CPackWIX.cmake")) {
|
if (!ReadListFile("CPackWIX.cmake")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while executing CPackWIX.cmake"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error while executing CPackWIX.cmake" << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,12 +167,13 @@ bool cmCPackWIXGenerator::InitializeWiXConfiguration()
|
|||||||
std::string guid = GenerateGUID();
|
std::string guid = GenerateGUID();
|
||||||
SetOption("CPACK_WIX_UPGRADE_GUID", guid.c_str());
|
SetOption("CPACK_WIX_UPGRADE_GUID", guid.c_str());
|
||||||
|
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||||
cmCPackLog::LOG_WARNING, "CPACK_WIX_UPGRADE_GUID implicitly set to "
|
"CPACK_WIX_UPGRADE_GUID implicitly set to "
|
||||||
<< guid << " . "
|
<< guid
|
||||||
"Please refer to the documentation on how and why "
|
<< " . "
|
||||||
"you might want to set this explicitly."
|
"Please refer to the documentation on how and why "
|
||||||
<< std::endl);
|
"you might want to set this explicitly."
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!RequireOption("CPACK_TOPLEVEL_DIRECTORY", this->CPackTopLevel)) {
|
if (!RequireOption("CPACK_TOPLEVEL_DIRECTORY", this->CPackTopLevel)) {
|
||||||
@@ -370,8 +372,9 @@ void cmCPackWIXGenerator::CreateWiXPropertiesIncludeFile()
|
|||||||
includeFile.AddAttribute("Id", "FindInstallLocation");
|
includeFile.AddAttribute("Id", "FindInstallLocation");
|
||||||
includeFile.AddAttribute("Root", "HKLM");
|
includeFile.AddAttribute("Root", "HKLM");
|
||||||
includeFile.AddAttribute(
|
includeFile.AddAttribute(
|
||||||
"Key", "Software\\Microsoft\\Windows\\"
|
"Key",
|
||||||
"CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
|
"Software\\Microsoft\\Windows\\"
|
||||||
|
"CurrentVersion\\Uninstall\\[WIX_UPGRADE_DETECTED]");
|
||||||
includeFile.AddAttribute("Name", "InstallLocation");
|
includeFile.AddAttribute("Name", "InstallLocation");
|
||||||
includeFile.AddAttribute("Type", "raw");
|
includeFile.AddAttribute("Type", "raw");
|
||||||
includeFile.EndElement("RegistrySearch");
|
includeFile.EndElement("RegistrySearch");
|
||||||
@@ -613,8 +616,9 @@ bool cmCPackWIXGenerator::GenerateMainSourceFileFromTemplate()
|
|||||||
std::string mainSourceFilePath = this->CPackTopLevel + "/main.wxs";
|
std::string mainSourceFilePath = this->CPackTopLevel + "/main.wxs";
|
||||||
|
|
||||||
if (!ConfigureFile(wixTemplate.c_str(), mainSourceFilePath.c_str())) {
|
if (!ConfigureFile(wixTemplate.c_str(), mainSourceFilePath.c_str())) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed creating '"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< mainSourceFilePath << "'' from template." << std::endl);
|
"Failed creating '" << mainSourceFilePath
|
||||||
|
<< "'' from template." << std::endl);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -957,8 +961,8 @@ bool cmCPackWIXGenerator::RequireOption(std::string const& name,
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Required variable "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< name << " not set" << std::endl);
|
"Required variable " << name << " not set" << std::endl);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,8 +66,9 @@ void cmWIXAccessControlList::CreatePermissionElement(std::string const& entry)
|
|||||||
void cmWIXAccessControlList::ReportError(std::string const& entry,
|
void cmWIXAccessControlList::ReportError(std::string const& entry,
|
||||||
std::string const& message)
|
std::string const& message)
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed processing ACL entry '"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< entry << "': " << message << std::endl);
|
"Failed processing ACL entry '" << entry << "': " << message
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
|
bool cmWIXAccessControlList::IsBooleanAttribute(std::string const& name)
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ bool cmWIXPatch::LoadFragments(std::string const& patchFilePath)
|
|||||||
{
|
{
|
||||||
cmWIXPatchParser parser(Fragments, Logger);
|
cmWIXPatchParser parser(Fragments, Logger);
|
||||||
if (!parser.ParseFile(patchFilePath.c_str())) {
|
if (!parser.ParseFile(patchFilePath.c_str())) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Failed parsing XML patch file: '"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< patchFilePath << "'" << std::endl);
|
"Failed parsing XML patch file: '" << patchFilePath << "'"
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ cmWIXSourceWriter::cmWIXSourceWriter(cmCPackLog* logger,
|
|||||||
cmWIXSourceWriter::~cmWIXSourceWriter()
|
cmWIXSourceWriter::~cmWIXSourceWriter()
|
||||||
{
|
{
|
||||||
if (Elements.size() > 1) {
|
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 '"
|
<< " WiX elements were still open when closing '"
|
||||||
<< SourceFilename << "'" << std::endl);
|
<< SourceFilename << "'" << std::endl);
|
||||||
return;
|
return;
|
||||||
@@ -65,7 +66,8 @@ void cmWIXSourceWriter::EndElement(std::string const& name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Elements.back() != 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
|
<< Elements.back() << "> can not be closed by </" << name
|
||||||
<< "> in '" << SourceFilename << "'" << std::endl);
|
<< "> in '" << SourceFilename << "'" << std::endl);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -87,8 +87,9 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
|
|||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
|
||||||
archive.Add(rp, 0, nullptr, false);
|
archive.Add(rp, 0, nullptr, false);
|
||||||
if (!archive) {
|
if (!archive) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< archive.GetError() << std::endl);
|
"ERROR while packaging files: " << archive.GetError()
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,7 +112,8 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
|
|||||||
} \
|
} \
|
||||||
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
|
cmArchiveWrite archive(gf, this->Compress, this->ArchiveFormat); \
|
||||||
if (!(archive)) { \
|
if (!(archive)) { \
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to create archive < " \
|
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
||||||
|
"Problem to create archive < " \
|
||||||
<< (filename) << ">. ERROR =" << (archive).GetError() \
|
<< (filename) << ">. ERROR =" << (archive).GetError() \
|
||||||
<< std::endl); \
|
<< std::endl); \
|
||||||
return 0; \
|
return 0; \
|
||||||
@@ -148,7 +150,8 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
// Does the component belong to a group?
|
// Does the component belong to a group?
|
||||||
if (comp.second.Group == nullptr) {
|
if (comp.second.Group == nullptr) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Component <"
|
||||||
<< comp.second.Name
|
<< comp.second.Name
|
||||||
<< "> does not belong to any group, package it separately."
|
<< "> does not belong to any group, package it separately."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -258,7 +261,8 @@ int cmCPackArchiveGenerator::PackageFiles()
|
|||||||
std::string rp = cmSystemTools::RelativePath(toplevel, file);
|
std::string rp = cmSystemTools::RelativePath(toplevel, file);
|
||||||
archive.Add(rp, 0, nullptr, false);
|
archive.Add(rp, 0, nullptr, false);
|
||||||
if (!archive) {
|
if (!archive) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"Problem while adding file< "
|
||||||
<< file << "> to archive <" << packageFileNames[0]
|
<< file << "> to archive <" << packageFileNames[0]
|
||||||
<< "> .ERROR =" << archive.GetError() << std::endl);
|
<< "> .ERROR =" << archive.GetError() << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ int cmCPackBundleGenerator::InitializeInternal()
|
|||||||
"codesign", std::vector<std::string>(), false);
|
"codesign", std::vector<std::string>(), false);
|
||||||
|
|
||||||
if (codesign_path.empty()) {
|
if (codesign_path.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate codesign command"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot locate codesign command" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_CODESIGN", codesign_path.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_CODESIGN", codesign_path.c_str());
|
||||||
@@ -59,8 +59,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
|||||||
? this->GetOption("CPACK_BUNDLE_NAME")
|
? this->GetOption("CPACK_BUNDLE_NAME")
|
||||||
: "";
|
: "";
|
||||||
if (cpack_bundle_name.empty()) {
|
if (cpack_bundle_name.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_NAME must be set."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"CPACK_BUNDLE_NAME must be set." << std::endl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -69,8 +69,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
|||||||
? this->GetOption("CPACK_BUNDLE_PLIST")
|
? this->GetOption("CPACK_BUNDLE_PLIST")
|
||||||
: "";
|
: "";
|
||||||
if (cpack_bundle_plist.empty()) {
|
if (cpack_bundle_plist.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_PLIST must be set."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"CPACK_BUNDLE_PLIST must be set." << std::endl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -79,8 +79,8 @@ int cmCPackBundleGenerator::ConstructBundle()
|
|||||||
? this->GetOption("CPACK_BUNDLE_ICON")
|
? this->GetOption("CPACK_BUNDLE_ICON")
|
||||||
: "";
|
: "";
|
||||||
if (cpack_bundle_icon.empty()) {
|
if (cpack_bundle_icon.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_BUNDLE_ICON must be set."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"CPACK_BUNDLE_ICON must be set." << std::endl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -269,8 +269,8 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Application has been codesigned"
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< std::endl);
|
"- Application has been codesigned" << std::endl);
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
(this->GetOption("CPACK_BUNDLE_APPLE_ENTITLEMENTS")
|
(this->GetOption("CPACK_BUNDLE_APPLE_ENTITLEMENTS")
|
||||||
? "with entitlement sandboxing"
|
? "with entitlement sandboxing"
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
// system tools because it is not implemented robustly enough to move
|
// system tools because it is not implemented robustly enough to move
|
||||||
// files across directories.
|
// files across directories.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "cm_sys_stat.h"
|
# include "cm_sys_stat.h"
|
||||||
#include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator()
|
cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator()
|
||||||
@@ -73,7 +73,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
|||||||
if (!cmSystemTools::CopyFileAlways(
|
if (!cmSystemTools::CopyFileAlways(
|
||||||
this->GetOption("CPACK_CYGWIN_PATCH_FILE"),
|
this->GetOption("CPACK_CYGWIN_PATCH_FILE"),
|
||||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
|
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_CYGWIN_PATCH_FILE") << "]\nto\n["
|
||||||
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -87,7 +88,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
|||||||
if (!cmSystemTools::CopyFileAlways(
|
if (!cmSystemTools::CopyFileAlways(
|
||||||
this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"),
|
this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"),
|
||||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) {
|
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_CYGWIN_BUILD_SCRIPT") << "\nto\n"
|
||||||
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
<< this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -96,7 +98,8 @@ int cmCPackCygwinSourceGenerator::PackageFiles()
|
|||||||
outerTarFile += "-";
|
outerTarFile += "-";
|
||||||
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
||||||
if (!patch) {
|
if (!patch) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
|
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||||
|
"CPACK_CYGWIN_PATCH_NUMBER"
|
||||||
<< " not specified, defaulting to 1\n");
|
<< " not specified, defaulting to 1\n");
|
||||||
patch = "1";
|
patch = "1";
|
||||||
}
|
}
|
||||||
@@ -147,7 +150,8 @@ const char* cmCPackCygwinSourceGenerator::GetOutputExtension()
|
|||||||
this->OutputExtension = "-";
|
this->OutputExtension = "-";
|
||||||
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER");
|
||||||
if (!patch) {
|
if (!patch) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER"
|
cmCPackLogger(cmCPackLog::LOG_WARNING,
|
||||||
|
"CPACK_CYGWIN_PATCH_NUMBER"
|
||||||
<< " not specified, defaulting to 1\n");
|
<< " not specified, defaulting to 1\n");
|
||||||
patch = "1";
|
patch = "1";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
|
|||||||
this->SetOption("CPACK_DEB_PACKAGE_COMPONENT_PART_PATH",
|
this->SetOption("CPACK_DEB_PACKAGE_COMPONENT_PART_PATH",
|
||||||
component_path.c_str());
|
component_path.c_str());
|
||||||
if (!this->ReadListFile("CPackDeb.cmake")) {
|
if (!this->ReadListFile("CPackDeb.cmake")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error while execution CPackDeb.cmake" << std::endl);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,8 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
// Does the component belong to a group?
|
// Does the component belong to a group?
|
||||||
if (comp.second.Group == nullptr) {
|
if (comp.second.Group == nullptr) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Component <"
|
||||||
<< comp.second.Name
|
<< comp.second.Name
|
||||||
<< "> does not belong to any group, package it separately."
|
<< "> does not belong to any group, package it separately."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -179,8 +180,8 @@ int cmCPackDebGenerator::PackageComponentsAllInOne(
|
|||||||
component_path.c_str());
|
component_path.c_str());
|
||||||
}
|
}
|
||||||
if (!this->ReadListFile("CPackDeb.cmake")) {
|
if (!this->ReadListFile("CPackDeb.cmake")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackDeb.cmake"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error while execution CPackDeb.cmake" << std::endl);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@@ -413,7 +414,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
cmGeneratedFileStream fileStream_data_tar;
|
cmGeneratedFileStream fileStream_data_tar;
|
||||||
fileStream_data_tar.Open(filename_data_tar.c_str(), false, true);
|
fileStream_data_tar.Open(filename_data_tar.c_str(), false, true);
|
||||||
if (!fileStream_data_tar) {
|
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);
|
<< filename_data_tar << "\" for writing" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -430,9 +432,9 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would
|
// e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would
|
||||||
// give /usr and /opt
|
// give /usr and /opt
|
||||||
size_t topLevelLength = strGenWDIR.length();
|
size_t topLevelLength = strGenWDIR.length();
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "WDIR: \""
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< strGenWDIR << "\", length = " << topLevelLength
|
"WDIR: \"" << strGenWDIR << "\", length = " << topLevelLength
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
std::set<std::string> orderedFiles;
|
std::set<std::string> orderedFiles;
|
||||||
|
|
||||||
// we have to reconstruct the parent folders as well
|
// we have to reconstruct the parent folders as well
|
||||||
@@ -448,13 +450,13 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (std::string const& file : orderedFiles) {
|
for (std::string const& file : orderedFiles) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "FILEIT: \"" << file << "\""
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"FILEIT: \"" << file << "\"" << std::endl);
|
||||||
std::string::size_type slashPos = file.find('/', topLevelLength + 1);
|
std::string::size_type slashPos = file.find('/', topLevelLength + 1);
|
||||||
std::string relativeDir =
|
std::string relativeDir =
|
||||||
file.substr(topLevelLength, slashPos - topLevelLength);
|
file.substr(topLevelLength, slashPos - topLevelLength);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \""
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< relativeDir << "\"" << std::endl);
|
"RELATIVEDIR: \"" << relativeDir << "\"" << std::endl);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
std::string mode_t_adt_filename = file + ":cmake_mode_t";
|
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
|
// do not recurse because the loop will do it
|
||||||
if (!data_tar.Add(file, topLevelLength, ".", false)) {
|
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
|
<< std::endl
|
||||||
<< "#top level directory: " << strGenWDIR << std::endl
|
<< "#top level directory: " << strGenWDIR << std::endl
|
||||||
<< "#file: " << file << std::endl
|
<< "#file: " << file << std::endl
|
||||||
@@ -505,8 +508,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
std::string output =
|
std::string output =
|
||||||
cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5);
|
cmSystemTools::ComputeFileHash(file, cmCryptoHash::AlgoMD5);
|
||||||
if (output.empty()) {
|
if (output.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< file << std::endl);
|
"Problem computing the md5 of " << file << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
output += " " + file + "\n";
|
output += " " + file + "\n";
|
||||||
@@ -527,9 +530,10 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
cmGeneratedFileStream fileStream_control_tar;
|
cmGeneratedFileStream fileStream_control_tar;
|
||||||
fileStream_control_tar.Open(filename_control_tar.c_str(), false, true);
|
fileStream_control_tar.Open(filename_control_tar.c_str(), false, true);
|
||||||
if (!fileStream_control_tar) {
|
if (!fileStream_control_tar) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error opening the file \""
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< filename_control_tar << "\" for writing"
|
"Error opening the file \"" << filename_control_tar
|
||||||
<< std::endl);
|
<< "\" for writing"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cmArchiveWrite control_tar(fileStream_control_tar,
|
cmArchiveWrite control_tar(fileStream_control_tar,
|
||||||
@@ -557,7 +561,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
// adds control and md5sums
|
// adds control and md5sums
|
||||||
if (!control_tar.Add(md5filename, strGenWDIR.length(), ".") ||
|
if (!control_tar.Add(md5filename, strGenWDIR.length(), ".") ||
|
||||||
!control_tar.Add(strGenWDIR + "/control", 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
|
<< std::endl
|
||||||
<< "#top level directory: " << strGenWDIR << std::endl
|
<< "#top level directory: " << strGenWDIR << std::endl
|
||||||
<< "#file: \"control\" or \"md5sums\"" << std::endl
|
<< "#file: \"control\" or \"md5sums\"" << std::endl
|
||||||
@@ -568,7 +573,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
// adds generated shlibs file
|
// adds generated shlibs file
|
||||||
if (gen_shibs) {
|
if (gen_shibs) {
|
||||||
if (!control_tar.Add(shlibsfilename, strGenWDIR.length(), ".")) {
|
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
|
<< std::endl
|
||||||
<< "#top level directory: " << strGenWDIR << std::endl
|
<< "#top level directory: " << strGenWDIR << std::endl
|
||||||
<< "#file: \"shlibs\"" << std::endl
|
<< "#file: \"shlibs\"" << std::endl
|
||||||
@@ -581,7 +587,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTINST")) {
|
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTINST")) {
|
||||||
control_tar.SetPermissions(permission755);
|
control_tar.SetPermissions(permission755);
|
||||||
if (!control_tar.Add(postinst, strGenWDIR.length(), ".")) {
|
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
|
<< std::endl
|
||||||
<< "#top level directory: " << strGenWDIR << std::endl
|
<< "#top level directory: " << strGenWDIR << std::endl
|
||||||
<< "#file: \"postinst\"" << std::endl
|
<< "#file: \"postinst\"" << std::endl
|
||||||
@@ -594,7 +601,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTRM")) {
|
if (this->IsOn("GEN_CPACK_DEBIAN_GENERATE_POSTRM")) {
|
||||||
control_tar.SetPermissions(permission755);
|
control_tar.SetPermissions(permission755);
|
||||||
if (!control_tar.Add(postrm, strGenWDIR.length(), ".")) {
|
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
|
<< std::endl
|
||||||
<< "#top level directory: " << strGenWDIR << std::endl
|
<< "#top level directory: " << strGenWDIR << std::endl
|
||||||
<< "#file: \"postinst\"" << std::endl
|
<< "#file: \"postinst\"" << std::endl
|
||||||
@@ -659,7 +667,8 @@ int cmCPackDebGenerator::createDeb()
|
|||||||
if (!deb.Add(tlDir + "debian-binary", tlDir.length()) ||
|
if (!deb.Add(tlDir + "debian-binary", tlDir.length()) ||
|
||||||
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
|
!deb.Add(tlDir + "control.tar.gz", tlDir.length()) ||
|
||||||
!deb.Add(tlDir + "data.tar" + compression_suffix, 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
|
<< std::endl
|
||||||
<< "#top level directory: " << outputDir << std::endl
|
<< "#top level directory: " << outputDir << std::endl
|
||||||
<< "#file: " << outputName << std::endl
|
<< "#file: " << outputName << std::endl
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
// For the old LocaleStringToLangAndRegionCodes() function, to convert
|
// For the old LocaleStringToLangAndRegionCodes() function, to convert
|
||||||
// to the old Script Manager RegionCode values needed for the 'LPic' data
|
// to the old Script Manager RegionCode values needed for the 'LPic' data
|
||||||
// structure used for generating multi-lingual SLAs.
|
// structure used for generating multi-lingual SLAs.
|
||||||
#include <CoreServices/CoreServices.h>
|
# include <CoreServices/CoreServices.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char* SLAHeader =
|
static const char* SLAHeader =
|
||||||
@@ -77,8 +77,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
|||||||
const std::string hdiutil_path =
|
const std::string hdiutil_path =
|
||||||
cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
|
cmSystemTools::FindProgram("hdiutil", std::vector<std::string>(), false);
|
||||||
if (hdiutil_path.empty()) {
|
if (hdiutil_path.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate hdiutil command"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot locate hdiutil command" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_HDIUTIL", hdiutil_path.c_str());
|
||||||
@@ -86,16 +86,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
|||||||
const std::string setfile_path =
|
const std::string setfile_path =
|
||||||
cmSystemTools::FindProgram("SetFile", paths, false);
|
cmSystemTools::FindProgram("SetFile", paths, false);
|
||||||
if (setfile_path.empty()) {
|
if (setfile_path.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate SetFile command"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot locate SetFile command" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_SETFILE", setfile_path.c_str());
|
||||||
|
|
||||||
const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false);
|
const std::string rez_path = cmSystemTools::FindProgram("Rez", paths, false);
|
||||||
if (rez_path.empty()) {
|
if (rez_path.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot locate Rez command"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot locate Rez command" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_REZ", rez_path.c_str());
|
||||||
@@ -124,8 +124,8 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!cmSystemTools::FileExists(slaDirectory, false)) {
|
if (!cmSystemTools::FileExists(slaDirectory, false)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_DMG_SLA_DIR does not exist"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"CPACK_DMG_SLA_DIR does not exist" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,14 +140,16 @@ int cmCPackDragNDropGenerator::InitializeInternal()
|
|||||||
for (auto const& language : languages) {
|
for (auto const& language : languages) {
|
||||||
std::string license = slaDirectory + "/" + language + ".license.txt";
|
std::string license = slaDirectory + "/" + language + ".license.txt";
|
||||||
if (!singleLicense && !cmSystemTools::FileExists(license)) {
|
if (!singleLicense && !cmSystemTools::FileExists(license)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing license file "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< language << ".license.txt" << std::endl);
|
"Missing license file " << language << ".license.txt"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
std::string menu = slaDirectory + "/" + language + ".menu.txt";
|
std::string menu = slaDirectory + "/" + language + ".menu.txt";
|
||||||
if (!cmSystemTools::FileExists(menu)) {
|
if (!cmSystemTools::FileExists(menu)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Missing menu file "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< language << ".menu.txt" << std::endl);
|
"Missing menu file " << language << ".menu.txt"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,8 +214,9 @@ bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
|
|||||||
{
|
{
|
||||||
if (!cmSystemTools::CopyFileIfDifferent(source.str().c_str(),
|
if (!cmSystemTools::CopyFileIfDifferent(source.str().c_str(),
|
||||||
target.str().c_str())) {
|
target.str().c_str())) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error copying "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< source.str() << " to " << target.str() << std::endl);
|
"Error copying " << source.str() << " to " << target.str()
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -248,8 +251,8 @@ bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
|
|||||||
this->GeneratorVerbose, cmDuration::zero());
|
this->GeneratorVerbose, cmDuration::zero());
|
||||||
|
|
||||||
if (!result || exit_code) {
|
if (!result || exit_code) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error executing: " << command.str()
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error executing: " << command.str() << std::endl);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -400,8 +403,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
std::ostringstream dummy_padding;
|
std::ostringstream dummy_padding;
|
||||||
dummy_padding << staging.str() << "/.dummy-padding-file";
|
dummy_padding << staging.str() << "/.dummy-padding-file";
|
||||||
if (!this->CreateEmptyFile(dummy_padding, 1048576)) {
|
if (!this->CreateEmptyFile(dummy_padding, 1048576)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error creating dummy padding file."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error creating dummy padding file." << std::endl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -460,8 +463,8 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
std::ostringstream dummy_padding;
|
std::ostringstream dummy_padding;
|
||||||
dummy_padding << temp_mount << "/.dummy-padding-file";
|
dummy_padding << temp_mount << "/.dummy-padding-file";
|
||||||
if (!cmSystemTools::RemoveFile(dummy_padding.str())) {
|
if (!cmSystemTools::RemoveFile(dummy_padding.str())) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error removing dummy padding file."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error removing dummy padding file." << std::endl);
|
||||||
|
|
||||||
had_error = true;
|
had_error = true;
|
||||||
}
|
}
|
||||||
@@ -565,8 +568,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
CFLocaleCreateCanonicalLanguageIdentifierFromString(
|
CFLocaleCreateCanonicalLanguageIdentifierFromString(
|
||||||
nullptr, language_cfstring);
|
nullptr, language_cfstring);
|
||||||
if (!iso_language) {
|
if (!iso_language) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, languages[i]
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< " is not a recognized language" << std::endl);
|
languages[i] << " is not a recognized language"
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
char iso_language_cstr[65];
|
char iso_language_cstr[65];
|
||||||
CFStringGetCString(iso_language, iso_language_cstr,
|
CFStringGetCString(iso_language, iso_language_cstr,
|
||||||
@@ -638,9 +642,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
ofs.Close();
|
ofs.Close();
|
||||||
|
|
||||||
if (have_write_license_error) {
|
if (have_write_license_error) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error writing license file to SLA."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl
|
"Error writing license file to SLA." << std::endl
|
||||||
<< error << std::endl);
|
<< error
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,9 +697,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
embed_sla_command << "\"" << temp_image << "\"";
|
embed_sla_command << "\"" << temp_image << "\"";
|
||||||
|
|
||||||
if (!this->RunCommand(embed_sla_command, &error)) {
|
if (!this->RunCommand(embed_sla_command, &error)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error adding SLA." << std::endl
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< error
|
"Error adding SLA." << std::endl
|
||||||
<< std::endl);
|
<< error << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -726,9 +731,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
|
|||||||
std::string convert_error;
|
std::string convert_error;
|
||||||
|
|
||||||
if (!this->RunCommand(final_image_command, &convert_error)) {
|
if (!this->RunCommand(final_image_command, &convert_error)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error compressing disk image."
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl
|
"Error compressing disk image." << std::endl
|
||||||
<< convert_error << std::endl);
|
<< convert_error
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#if defined(__HAIKU__)
|
#if defined(__HAIKU__)
|
||||||
#include <FindDirectory.h>
|
# include <FindDirectory.h>
|
||||||
#include <StorageDefs.h>
|
# include <StorageDefs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmCPackGenerator::cmCPackGenerator()
|
cmCPackGenerator::cmCPackGenerator()
|
||||||
@@ -61,9 +61,10 @@ int cmCPackGenerator::PrepareNames()
|
|||||||
// checks CPACK_SET_DESTDIR support
|
// checks CPACK_SET_DESTDIR support
|
||||||
if (IsOn("CPACK_SET_DESTDIR")) {
|
if (IsOn("CPACK_SET_DESTDIR")) {
|
||||||
if (SETDESTDIR_UNSUPPORTED == SupportsSetDestdir()) {
|
if (SETDESTDIR_UNSUPPORTED == SupportsSetDestdir()) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "CPACK_SET_DESTDIR is set to ON but the '"
|
"CPACK_SET_DESTDIR is set to ON but the '"
|
||||||
<< Name << "' generator does NOT support it." << std::endl);
|
<< Name << "' generator does NOT support it."
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (SETDESTDIR_SHOULD_NOT_BE_USED == SupportsSetDestdir()) {
|
if (SETDESTDIR_SHOULD_NOT_BE_USED == SupportsSetDestdir()) {
|
||||||
@@ -92,8 +93,8 @@ int cmCPackGenerator::PrepareNames()
|
|||||||
std::string outName = pfname;
|
std::string outName = pfname;
|
||||||
tempDirectory += "/" + outName;
|
tempDirectory += "/" + outName;
|
||||||
if (!this->GetOutputExtension()) {
|
if (!this->GetOutputExtension()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "No output extension specified"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"No output extension specified" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
outName += this->GetOutputExtension();
|
outName += this->GetOutputExtension();
|
||||||
@@ -125,8 +126,8 @@ int cmCPackGenerator::PrepareNames()
|
|||||||
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
|
"Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl);
|
||||||
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
|
const char* descFileName = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE");
|
||||||
if (descFileName) {
|
if (descFileName) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for: " << descFileName
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Look for: " << descFileName << std::endl);
|
||||||
if (!cmSystemTools::FileExists(descFileName)) {
|
if (!cmSystemTools::FileExists(descFileName)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Cannot find description file name: ["
|
"Cannot find description file name: ["
|
||||||
@@ -161,8 +162,9 @@ int cmCPackGenerator::PrepareNames()
|
|||||||
const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM");
|
const char* algoSignature = this->GetOption("CPACK_PACKAGE_CHECKSUM");
|
||||||
if (algoSignature) {
|
if (algoSignature) {
|
||||||
if (!cmCryptoHash::New(algoSignature)) {
|
if (!cmCryptoHash::New(algoSignature)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot recognize algorithm: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< algoSignature << std::endl);
|
"Cannot recognize algorithm: " << algoSignature
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,7 +217,8 @@ int cmCPackGenerator::InstallProject()
|
|||||||
cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
|
cmSystemTools::ExpandListArgument(default_dir_install_permissions, items);
|
||||||
for (const auto& arg : items) {
|
for (const auto& arg : items) {
|
||||||
if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) {
|
if (!cmFSPermissions::stringToModeT(arg, default_dir_mode_v)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Invalid permission value '"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"Invalid permission value '"
|
||||||
<< arg
|
<< arg
|
||||||
<< "'."
|
<< "'."
|
||||||
" CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "
|
" CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS "
|
||||||
@@ -289,10 +292,11 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
|
|||||||
ofs << "# Run command: " << ic << std::endl
|
ofs << "# Run command: " << ic << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "Problem running install command: "
|
"Problem running install command: "
|
||||||
<< ic << std::endl
|
<< ic << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -376,8 +380,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
}
|
}
|
||||||
std::string filePath = tempDir;
|
std::string filePath = tempDir;
|
||||||
filePath += "/" + subdir + "/" + cmSystemTools::RelativePath(top, gf);
|
filePath += "/" + subdir + "/" + cmSystemTools::RelativePath(top, gf);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< inFile << " -> " << filePath << std::endl);
|
"Copy file: " << inFile << " -> " << filePath
|
||||||
|
<< std::endl);
|
||||||
/* If the file is a symlink we will have to re-create it */
|
/* If the file is a symlink we will have to re-create it */
|
||||||
if (cmSystemTools::FileIsSymlink(inFile)) {
|
if (cmSystemTools::FileIsSymlink(inFile)) {
|
||||||
std::string targetFile;
|
std::string targetFile;
|
||||||
@@ -392,8 +397,9 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
filePath.c_str()) &&
|
filePath.c_str()) &&
|
||||||
cmSystemTools::CopyFileTime(inFile.c_str(),
|
cmSystemTools::CopyFileTime(inFile.c_str(),
|
||||||
filePath.c_str()))) {
|
filePath.c_str()))) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< inFile << " -> " << filePath << std::endl);
|
"Problem copying file: " << inFile << " -> "
|
||||||
|
<< filePath << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -402,40 +408,44 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
std::string curDir = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string curDir = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
std::string goToDir = tempDir;
|
std::string goToDir = tempDir;
|
||||||
goToDir += "/" + subdir;
|
goToDir += "/" + subdir;
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Change dir to: " << goToDir
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Change dir to: " << goToDir << std::endl);
|
||||||
cmWorkingDirectory workdir(goToDir);
|
cmWorkingDirectory workdir(goToDir);
|
||||||
if (workdir.Failed()) {
|
if (workdir.Failed()) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "Failed to change working directory to "
|
"Failed to change working directory to "
|
||||||
<< goToDir << " : " << std::strerror(workdir.GetLastResult())
|
<< goToDir << " : "
|
||||||
<< std::endl);
|
<< std::strerror(workdir.GetLastResult())
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for (auto const& symlinked : symlinkedFiles) {
|
for (auto const& symlinked : symlinkedFiles) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Will create a symlink: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< symlinked.second << "--> " << symlinked.first
|
"Will create a symlink: " << symlinked.second << "--> "
|
||||||
<< std::endl);
|
<< symlinked.first
|
||||||
|
<< std::endl);
|
||||||
// make sure directory exists for symlink
|
// make sure directory exists for symlink
|
||||||
std::string destDir =
|
std::string destDir =
|
||||||
cmSystemTools::GetFilenamePath(symlinked.second);
|
cmSystemTools::GetFilenamePath(symlinked.second);
|
||||||
if (!destDir.empty() &&
|
if (!destDir.empty() &&
|
||||||
!cmSystemTools::MakeDirectory(destDir, default_dir_mode)) {
|
!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: "
|
<< destDir << "\nTrying to create symlink: "
|
||||||
<< symlinked.second << "--> " << symlinked.first
|
<< symlinked.second << "--> " << symlinked.first
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
if (!cmSystemTools::CreateSymlink(symlinked.first,
|
if (!cmSystemTools::CreateSymlink(symlinked.first,
|
||||||
symlinked.second)) {
|
symlinked.second)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create symlink: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"Cannot create symlink: "
|
||||||
<< symlinked.second << "--> " << symlinked.first
|
<< symlinked.second << "--> " << symlinked.first
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Going back to: " << curDir
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Going back to: " << curDir << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -447,8 +457,8 @@ int cmCPackGenerator::InstallProjectViaInstallScript(
|
|||||||
{
|
{
|
||||||
const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT");
|
const char* cmakeScripts = this->GetOption("CPACK_INSTALL_SCRIPT");
|
||||||
if (cmakeScripts && *cmakeScripts) {
|
if (cmakeScripts && *cmakeScripts) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install scripts: " << cmakeScripts
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< std::endl);
|
"- Install scripts: " << cmakeScripts << std::endl);
|
||||||
std::vector<std::string> cmakeScriptsVector;
|
std::vector<std::string> cmakeScriptsVector;
|
||||||
cmSystemTools::ExpandListArgument(cmakeScripts, cmakeScriptsVector);
|
cmSystemTools::ExpandListArgument(cmakeScripts, cmakeScriptsVector);
|
||||||
for (std::string const& installScript : cmakeScriptsVector) {
|
for (std::string const& installScript : cmakeScriptsVector) {
|
||||||
@@ -603,8 +613,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
preinstall, buildConfig, "", false);
|
preinstall, buildConfig, "", false);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
"- Install command: " << buildCommand << std::endl);
|
"- Install command: " << buildCommand << std::endl);
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Run preinstall target for: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< installProjectName << std::endl);
|
"- Run preinstall target for: " << installProjectName
|
||||||
|
<< std::endl);
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
bool resB = cmSystemTools::RunSingleCommand(
|
bool resB = cmSystemTools::RunSingleCommand(
|
||||||
@@ -619,10 +630,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
<< "# Directory: " << installDirectory << std::endl
|
<< "# Directory: " << installDirectory << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "Problem running install command: "
|
"Problem running install command: "
|
||||||
<< buildCommand << std::endl
|
<< buildCommand << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -636,8 +648,9 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
std::string tempInstallDirectory = baseTempInstallDirectory;
|
std::string tempInstallDirectory = baseTempInstallDirectory;
|
||||||
installComponent = component;
|
installComponent = component;
|
||||||
if (componentInstall) {
|
if (componentInstall) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Install component: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< installComponent << std::endl);
|
"- Install component: " << installComponent
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmake cm(cmake::RoleScript);
|
cmake cm(cmake::RoleScript);
|
||||||
@@ -733,8 +746,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
*/
|
*/
|
||||||
cmSystemTools::PutEnv(std::string("DESTDIR=") +
|
cmSystemTools::PutEnv(std::string("DESTDIR=") +
|
||||||
tempInstallDirectory);
|
tempInstallDirectory);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "- Creating directory: '"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< dir << "'" << std::endl);
|
"- Creating directory: '" << dir << "'" << std::endl);
|
||||||
|
|
||||||
if (!cmsys::SystemTools::MakeDirectory(dir, default_dir_mode)) {
|
if (!cmsys::SystemTools::MakeDirectory(dir, default_dir_mode)) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
@@ -840,7 +853,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
|||||||
localFileName =
|
localFileName =
|
||||||
localFileName.substr(localFileName.find_first_not_of('/'));
|
localFileName.substr(localFileName.find_first_not_of('/'));
|
||||||
Components[installComponent].Files.push_back(localFileName);
|
Components[installComponent].Files.push_back(localFileName);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
|
"Adding file <"
|
||||||
<< localFileName << "> to component <"
|
<< localFileName << "> to component <"
|
||||||
<< installComponent << ">" << std::endl);
|
<< installComponent << ">" << std::endl);
|
||||||
}
|
}
|
||||||
@@ -912,16 +926,16 @@ void cmCPackGenerator::SetOption(const std::string& op, const char* value)
|
|||||||
this->MakefileMap->RemoveDefinition(op);
|
this->MakefileMap->RemoveDefinition(op);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, this->GetNameOfClass()
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< "::SetOption(" << op << ", " << value << ")"
|
this->GetNameOfClass() << "::SetOption(" << op << ", " << value
|
||||||
<< std::endl);
|
<< ")" << std::endl);
|
||||||
this->MakefileMap->AddDefinition(op, value);
|
this->MakefileMap->AddDefinition(op, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cmCPackGenerator::DoPackage()
|
int cmCPackGenerator::DoPackage()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package using " << this->Name
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< std::endl);
|
"Create package using " << this->Name << std::endl);
|
||||||
|
|
||||||
// Prepare CPack internal name and check
|
// Prepare CPack internal name and check
|
||||||
// values for many CPACK_xxx vars
|
// values for many CPACK_xxx vars
|
||||||
@@ -939,8 +953,9 @@ int cmCPackGenerator::DoPackage()
|
|||||||
const char* toplevelDirectory =
|
const char* toplevelDirectory =
|
||||||
this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
|
||||||
if (cmSystemTools::FileExists(toplevelDirectory)) {
|
if (cmSystemTools::FileExists(toplevelDirectory)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< toplevelDirectory << std::endl);
|
"Remove toplevel directory: " << toplevelDirectory
|
||||||
|
<< std::endl);
|
||||||
if (!cmSystemTools::RepeatedRemoveDirectory(toplevelDirectory)) {
|
if (!cmSystemTools::RepeatedRemoveDirectory(toplevelDirectory)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Problem removing toplevel directory: "
|
"Problem removing toplevel directory: "
|
||||||
@@ -949,8 +964,8 @@ int cmCPackGenerator::DoPackage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "About to install project "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"About to install project " << std::endl);
|
||||||
|
|
||||||
if (!this->InstallProject()) {
|
if (!this->InstallProject()) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -975,12 +990,13 @@ int cmCPackGenerator::DoPackage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Create package" << std::endl);
|
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)")
|
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if (cmSystemTools::FileExists(tempPackageFileName)) {
|
if (cmSystemTools::FileExists(tempPackageFileName)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file"
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< std::endl);
|
"Remove old package file" << std::endl);
|
||||||
cmSystemTools::RemoveFile(tempPackageFileName);
|
cmSystemTools::RemoveFile(tempPackageFileName);
|
||||||
}
|
}
|
||||||
if (cmSystemTools::IsOn(
|
if (cmSystemTools::IsOn(
|
||||||
@@ -1006,8 +1022,8 @@ int cmCPackGenerator::DoPackage()
|
|||||||
std::string());
|
std::string());
|
||||||
|
|
||||||
if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) {
|
if (!this->PackageFiles() || cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Problem compressing the directory" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1022,8 +1038,9 @@ int cmCPackGenerator::DoPackage()
|
|||||||
* - the initially provided name may have changed
|
* - the initially provided name may have changed
|
||||||
* (because the specific generator did 'normalize' it)
|
* (because the specific generator did 'normalize' it)
|
||||||
*/
|
*/
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Copying final package(s) ["
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< packageFileNames.size() << "]:" << std::endl);
|
"Copying final package(s) [" << packageFileNames.size()
|
||||||
|
<< "]:" << std::endl);
|
||||||
/* now copy package one by one */
|
/* now copy package one by one */
|
||||||
for (std::string const& pkgFileName : packageFileNames) {
|
for (std::string const& pkgFileName : packageFileNames) {
|
||||||
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
|
std::string tmpPF(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
|
||||||
@@ -1031,20 +1048,23 @@ int cmCPackGenerator::DoPackage()
|
|||||||
tempPackageFileName = pkgFileName.c_str();
|
tempPackageFileName = pkgFileName.c_str();
|
||||||
tmpPF += "/" + filename;
|
tmpPF += "/" + filename;
|
||||||
const char* packageFileName = tmpPF.c_str();
|
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)")
|
<< (tempPackageFileName ? tempPackageFileName : "(NULL)")
|
||||||
<< " to " << (packageFileName ? packageFileName : "(NULL)")
|
<< " to " << (packageFileName ? packageFileName : "(NULL)")
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if (!cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
|
if (!cmSystemTools::CopyFileIfDifferent(tempPackageFileName,
|
||||||
packageFileName)) {
|
packageFileName)) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_ERROR, "Problem copying the package: "
|
cmCPackLog::LOG_ERROR,
|
||||||
|
"Problem copying the package: "
|
||||||
<< (tempPackageFileName ? tempPackageFileName : "(NULL)") << " to "
|
<< (tempPackageFileName ? tempPackageFileName : "(NULL)") << " to "
|
||||||
<< (packageFileName ? packageFileName : "(NULL)") << std::endl);
|
<< (packageFileName ? packageFileName : "(NULL)") << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- package: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< packageFileName << " generated." << std::endl);
|
"- package: " << packageFileName << " generated."
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
/* Generate checksum file */
|
/* Generate checksum file */
|
||||||
if (crypto) {
|
if (crypto) {
|
||||||
@@ -1053,13 +1073,15 @@ int cmCPackGenerator::DoPackage()
|
|||||||
hashFile += "." + cmSystemTools::LowerCase(algo);
|
hashFile += "." + cmSystemTools::LowerCase(algo);
|
||||||
cmsys::ofstream outF(hashFile.c_str());
|
cmsys::ofstream outF(hashFile.c_str());
|
||||||
if (!outF) {
|
if (!outF) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create checksum file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< hashFile << std::endl);
|
"Cannot create checksum file: " << hashFile
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
outF << crypto->HashFile(packageFileName) << " " << filename << "\n";
|
outF << crypto->HashFile(packageFileName) << " " << filename << "\n";
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- checksum file: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< hashFile << " generated." << std::endl);
|
"- checksum file: " << hashFile << " generated."
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1179,7 +1201,8 @@ const char* cmCPackGenerator::GetInstallPath()
|
|||||||
|
|
||||||
const char* cmCPackGenerator::GetPackagingInstallPrefix()
|
const char* cmCPackGenerator::GetPackagingInstallPrefix()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "GetPackagingInstallPrefix: '"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
|
"GetPackagingInstallPrefix: '"
|
||||||
<< this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'"
|
<< this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
|
||||||
@@ -1188,11 +1211,12 @@ const char* cmCPackGenerator::GetPackagingInstallPrefix()
|
|||||||
|
|
||||||
std::string cmCPackGenerator::FindTemplate(const char* name)
|
std::string cmCPackGenerator::FindTemplate(const char* name)
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< (name ? name : "(NULL)") << std::endl);
|
"Look for template: " << (name ? name : "(NULL)")
|
||||||
|
<< std::endl);
|
||||||
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
std::string ffile = this->MakefileMap->GetModulesFile(name);
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: " << ffile
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Found template: " << ffile << std::endl);
|
||||||
return ffile;
|
return ffile;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1260,10 +1284,10 @@ int cmCPackGenerator::PrepareGroupingKind()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!groupingType.empty()) {
|
if (!groupingType.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< this->Name << "]"
|
"[" << this->Name << "]"
|
||||||
<< " requested component grouping = " << groupingType
|
<< " requested component grouping = " << groupingType
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
if (groupingType == "ALL_COMPONENTS_IN_ONE") {
|
if (groupingType == "ALL_COMPONENTS_IN_ONE") {
|
||||||
method = ONE_PACKAGE;
|
method = ONE_PACKAGE;
|
||||||
} else if (groupingType == "IGNORE") {
|
} else if (groupingType == "IGNORE") {
|
||||||
@@ -1272,11 +1296,11 @@ int cmCPackGenerator::PrepareGroupingKind()
|
|||||||
method = ONE_PACKAGE_PER_GROUP;
|
method = ONE_PACKAGE_PER_GROUP;
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_WARNING, "["
|
cmCPackLog::LOG_WARNING,
|
||||||
<< this->Name << "]"
|
"[" << this->Name << "]"
|
||||||
<< " requested component grouping type <" << groupingType
|
<< " requested component grouping type <" << groupingType
|
||||||
<< "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
|
<< "> UNKNOWN not in (ALL_COMPONENTS_IN_ONE,IGNORE,ONE_PER_GROUP)"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1290,11 +1314,11 @@ int cmCPackGenerator::PrepareGroupingKind()
|
|||||||
method = ONE_PACKAGE_PER_COMPONENT;
|
method = ONE_PACKAGE_PER_COMPONENT;
|
||||||
}
|
}
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_WARNING, "["
|
cmCPackLog::LOG_WARNING,
|
||||||
<< this->Name << "]"
|
"[" << this->Name << "]"
|
||||||
<< " One package per component group requested, "
|
<< " One package per component group requested, "
|
||||||
<< "but NO component groups exist: Ignoring component group."
|
<< "but NO component groups exist: Ignoring component group."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if user specified packaging method, override the default packaging method
|
// 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",
|
const char* method_names[] = { "ALL_COMPONENTS_IN_ONE", "IGNORE_GROUPS",
|
||||||
"ONE_PER_GROUP" };
|
"ONE_PER_GROUP" };
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< this->Name << "]"
|
"[" << this->Name << "]"
|
||||||
<< " requested component grouping = "
|
<< " requested component grouping = "
|
||||||
<< method_names[componentPackageMethod] << std::endl);
|
<< method_names[componentPackageMethod] << std::endl);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1371,7 +1395,8 @@ bool cmCPackGenerator::SupportsComponentInstallation() const
|
|||||||
|
|
||||||
bool cmCPackGenerator::WantsComponentInstallation() 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
|
// check that we have at least one group or component
|
||||||
&& (!this->ComponentGroups.empty() || !this->Components.empty()));
|
&& (!this->ComponentGroups.empty() || !this->Components.empty()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include "cmAlgorithms.h"
|
#include "cmAlgorithms.h"
|
||||||
#include "cmCPack7zGenerator.h"
|
#include "cmCPack7zGenerator.h"
|
||||||
#ifdef HAVE_FREEBSD_PKG
|
#ifdef HAVE_FREEBSD_PKG
|
||||||
#include "cmCPackFreeBSDGenerator.h"
|
# include "cmCPackFreeBSDGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
#include "cmCPackDebGenerator.h"
|
#include "cmCPackDebGenerator.h"
|
||||||
#include "cmCPackGenerator.h"
|
#include "cmCPackGenerator.h"
|
||||||
@@ -24,25 +24,25 @@
|
|||||||
#include "cmCPackZIPGenerator.h"
|
#include "cmCPackZIPGenerator.h"
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include "cmCPackBundleGenerator.h"
|
# include "cmCPackBundleGenerator.h"
|
||||||
#include "cmCPackDragNDropGenerator.h"
|
# include "cmCPackDragNDropGenerator.h"
|
||||||
#include "cmCPackOSXX11Generator.h"
|
# include "cmCPackOSXX11Generator.h"
|
||||||
#include "cmCPackPackageMakerGenerator.h"
|
# include "cmCPackPackageMakerGenerator.h"
|
||||||
#include "cmCPackProductBuildGenerator.h"
|
# include "cmCPackProductBuildGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
#include "cmCPackCygwinBinaryGenerator.h"
|
# include "cmCPackCygwinBinaryGenerator.h"
|
||||||
#include "cmCPackCygwinSourceGenerator.h"
|
# include "cmCPackCygwinSourceGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \
|
#if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) && \
|
||||||
!defined(__HAIKU__)
|
!defined(__HAIKU__)
|
||||||
#include "cmCPackRPMGenerator.h"
|
# include "cmCPackRPMGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_LIBUUID))
|
#if defined(_WIN32) || (defined(__CYGWIN__) && defined(HAVE_LIBUUID))
|
||||||
#include "WiX/cmCPackWIXGenerator.h"
|
# include "WiX/cmCPackWIXGenerator.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
|
cmCPackGeneratorFactory::cmCPackGeneratorFactory()
|
||||||
|
|||||||
@@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
/* NSIS uses different command line syntax on Windows and others */
|
/* NSIS uses different command line syntax on Windows and others */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define NSIS_OPT "/"
|
# define NSIS_OPT "/"
|
||||||
#else
|
#else
|
||||||
#define NSIS_OPT "-"
|
# define NSIS_OPT "-"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
|
cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
|
||||||
@@ -81,8 +81,8 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
|
|
||||||
str << " Delete \"" << outputDir << "\\" << fileN << "\"" << std::endl;
|
str << " Delete \"" << outputDir << "\\" << fileN << "\"" << std::endl;
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " << str.str()
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Uninstall Files: " << str.str() << std::endl);
|
||||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
|
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str());
|
||||||
std::vector<std::string> dirs;
|
std::vector<std::string> dirs;
|
||||||
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
|
||||||
@@ -117,12 +117,13 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
this->Components[componentName].Directories.push_back(std::move(fileN));
|
this->Components[componentName].Directories.push_back(std::move(fileN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " << dstr.str()
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Uninstall Dirs: " << dstr.str() << std::endl);
|
||||||
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str());
|
this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str());
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< nsisInFileName << " to " << nsisFileName << std::endl);
|
"Configure file: " << nsisInFileName << " to " << nsisFileName
|
||||||
|
<< std::endl);
|
||||||
if (this->IsSet("CPACK_NSIS_MUI_ICON") ||
|
if (this->IsSet("CPACK_NSIS_MUI_ICON") ||
|
||||||
this->IsSet("CPACK_NSIS_MUI_UNIICON")) {
|
this->IsSet("CPACK_NSIS_MUI_UNIICON")) {
|
||||||
std::string installerIconCode;
|
std::string installerIconCode;
|
||||||
@@ -308,10 +309,11 @@ int cmCPackNSISGenerator::PackageFiles()
|
|||||||
ofs << "# Run command: " << nsisCmd << std::endl
|
ofs << "# Run command: " << nsisCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< nsisCmd << std::endl
|
"Problem running NSIS command: " << nsisCmd << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors"
|
<< "Please check "
|
||||||
<< std::endl);
|
<< tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@@ -329,28 +331,31 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", nullptr);
|
this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"cmCPackNSISGenerator::Initialize()" << std::endl);
|
||||||
std::vector<std::string> path;
|
std::vector<std::string> path;
|
||||||
std::string nsisPath;
|
std::string nsisPath;
|
||||||
bool gotRegValue = false;
|
bool gotRegValue = false;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (Nsis64) {
|
if (Nsis64) {
|
||||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
if (!gotRegValue &&
|
||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
|
cmsys::SystemTools::ReadRegistryValue(
|
||||||
nsisPath, cmsys::SystemTools::KeyWOW64_64)) {
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
|
||||||
|
cmsys::SystemTools::KeyWOW64_64)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
if (!gotRegValue &&
|
||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
cmsys::SystemTools::ReadRegistryValue(
|
||||||
cmsys::SystemTools::KeyWOW64_64)) {
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||||
|
cmsys::SystemTools::KeyWOW64_64)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
if (!gotRegValue &&
|
||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode",
|
cmsys::SystemTools::ReadRegistryValue(
|
||||||
nsisPath, cmsys::SystemTools::KeyWOW64_32)) {
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath,
|
||||||
|
cmsys::SystemTools::KeyWOW64_32)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
if (!gotRegValue &&
|
if (!gotRegValue &&
|
||||||
@@ -358,13 +363,15 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath)) {
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS\\Unicode", nsisPath)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
if (!gotRegValue &&
|
||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
cmsys::SystemTools::ReadRegistryValue(
|
||||||
cmsys::SystemTools::KeyWOW64_32)) {
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath,
|
||||||
|
cmsys::SystemTools::KeyWOW64_32)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
if (!gotRegValue && cmsys::SystemTools::ReadRegistryValue(
|
if (!gotRegValue &&
|
||||||
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
|
cmsys::SystemTools::ReadRegistryValue(
|
||||||
|
"HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath)) {
|
||||||
gotRegValue = true;
|
gotRegValue = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -395,8 +402,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION";
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: " << nsisCmd
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< std::endl);
|
"Test NSIS version: " << nsisCmd << std::endl);
|
||||||
std::string output;
|
std::string output;
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
bool resS = cmSystemTools::RunSingleCommand(
|
bool resS = cmSystemTools::RunSingleCommand(
|
||||||
@@ -413,17 +420,18 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
ofs << "# Run command: " << nsisCmd << std::endl
|
ofs << "# Run command: " << nsisCmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "Problem checking NSIS version with command: "
|
"Problem checking NSIS version with command: "
|
||||||
<< nsisCmd << std::endl
|
<< nsisCmd << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (versionRex.find(output)) {
|
if (versionRex.find(output)) {
|
||||||
double nsisVersion = atof(versionRex.match(1).c_str());
|
double nsisVersion = atof(versionRex.match(1).c_str());
|
||||||
double minNSISVersion = 2.09;
|
double minNSISVersion = 2.09;
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " << nsisVersion
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"NSIS Version: " << nsisVersion << std::endl);
|
||||||
if (nsisVersion < minNSISVersion) {
|
if (nsisVersion < minNSISVersion) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"CPack requires NSIS Version 2.09 or greater. "
|
"CPack requires NSIS Version 2.09 or greater. "
|
||||||
@@ -434,8 +442,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
}
|
}
|
||||||
if (versionRexCVS.find(output)) {
|
if (versionRexCVS.find(output)) {
|
||||||
// No version check for NSIS cvs build
|
// No version check for NSIS cvs build
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< versionRexCVS.match(1) << std::endl);
|
"NSIS Version: CVS " << versionRexCVS.match(1) << std::endl);
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
|
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str());
|
||||||
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin");
|
||||||
@@ -447,8 +455,9 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY");
|
this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY");
|
||||||
std::vector<std::string> cpackPackageDesktopLinksVector;
|
std::vector<std::string> cpackPackageDesktopLinksVector;
|
||||||
if (cpackPackageDeskTopLinks) {
|
if (cpackPackageDeskTopLinks) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< cpackPackageDeskTopLinks << std::endl);
|
"CPACK_CREATE_DESKTOP_LINKS: " << cpackPackageDeskTopLinks
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
cmSystemTools::ExpandListArgument(cpackPackageDeskTopLinks,
|
cmSystemTools::ExpandListArgument(cpackPackageDeskTopLinks,
|
||||||
cpackPackageDesktopLinksVector);
|
cpackPackageDesktopLinksVector);
|
||||||
@@ -457,7 +466,8 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
"CPACK_CREATE_DESKTOP_LINKS: " << cpdl << std::endl);
|
"CPACK_CREATE_DESKTOP_LINKS: " << cpdl << std::endl);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
|
"CPACK_CREATE_DESKTOP_LINKS: "
|
||||||
<< "not set" << std::endl);
|
<< "not set" << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,8 +475,9 @@ int cmCPackNSISGenerator::InitializeInternal()
|
|||||||
std::ostringstream deleteStr;
|
std::ostringstream deleteStr;
|
||||||
|
|
||||||
if (cpackPackageExecutables) {
|
if (cpackPackageExecutables) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< cpackPackageExecutables << "." << std::endl);
|
"The cpackPackageExecutables: " << cpackPackageExecutables
|
||||||
|
<< "." << std::endl);
|
||||||
std::vector<std::string> cpackPackageExecutablesVector;
|
std::vector<std::string> cpackPackageExecutablesVector;
|
||||||
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
|
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
|
||||||
cpackPackageExecutablesVector);
|
cpackPackageExecutablesVector);
|
||||||
@@ -683,8 +694,9 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
|||||||
<< std::endl);
|
<< std::endl);
|
||||||
if (cmSystemTools::FileExists(archiveFile, true)) {
|
if (cmSystemTools::FileExists(archiveFile, true)) {
|
||||||
if (!cmSystemTools::RemoveFile(archiveFile)) {
|
if (!cmSystemTools::RemoveFile(archiveFile)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to remove archive file "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< archiveFile << std::endl);
|
"Unable to remove archive file " << archiveFile
|
||||||
|
<< std::endl);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -694,8 +706,8 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
|||||||
this->ReadListFile("CPackZIP.cmake");
|
this->ReadListFile("CPackZIP.cmake");
|
||||||
|
|
||||||
if (!this->IsSet("ZIP_EXECUTABLE")) {
|
if (!this->IsSet("ZIP_EXECUTABLE")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Unable to find ZIP program"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Unable to find ZIP program" << std::endl);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -746,10 +758,11 @@ std::string cmCPackNSISGenerator::CreateComponentDescription(
|
|||||||
ofs << "# Run command: " << cmd << std::endl
|
ofs << "# Run command: " << cmd << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< cmd << std::endl
|
"Problem running zip command: " << cmd << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors"
|
<< "Please check "
|
||||||
<< std::endl);
|
<< tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ void cmCPackNuGetGenerator::SetupGroupComponentVariables(bool ignoreGroup)
|
|||||||
// Does the component belong to a group?
|
// Does the component belong to a group?
|
||||||
if (comp.second.Group == nullptr) {
|
if (comp.second.Group == nullptr) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Component <"
|
||||||
<< comp.second.Name
|
<< comp.second.Name
|
||||||
<< "> does not belong to any group, package it separately."
|
<< "> does not belong to any group, package it separately."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
|
|||||||
@@ -27,8 +27,9 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
const char* cpackPackageExecutables =
|
const char* cpackPackageExecutables =
|
||||||
this->GetOption("CPACK_PACKAGE_EXECUTABLES");
|
this->GetOption("CPACK_PACKAGE_EXECUTABLES");
|
||||||
if (cpackPackageExecutables) {
|
if (cpackPackageExecutables) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< cpackPackageExecutables << "." << std::endl);
|
"The cpackPackageExecutables: " << cpackPackageExecutables
|
||||||
|
<< "." << std::endl);
|
||||||
std::ostringstream str;
|
std::ostringstream str;
|
||||||
std::ostringstream deleteStr;
|
std::ostringstream deleteStr;
|
||||||
std::vector<std::string> cpackPackageExecutablesVector;
|
std::vector<std::string> cpackPackageExecutablesVector;
|
||||||
@@ -78,7 +79,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
if (iconFile) {
|
if (iconFile) {
|
||||||
std::string iconFileName = cmsys::SystemTools::GetFilenameName(iconFile);
|
std::string iconFileName = cmsys::SystemTools::GetFilenameName(iconFile);
|
||||||
if (!cmSystemTools::FileExists(iconFile)) {
|
if (!cmSystemTools::FileExists(iconFile)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find icon file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"Cannot find icon file: "
|
||||||
<< iconFile
|
<< iconFile
|
||||||
<< ". Please check CPACK_PACKAGE_ICON setting."
|
<< ". Please check CPACK_PACKAGE_ICON setting."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -109,8 +111,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
!this->CopyResourcePlistFile("OSXScriptLauncher", appdir,
|
!this->CopyResourcePlistFile("OSXScriptLauncher", appdir,
|
||||||
this->GetOption("CPACK_PACKAGE_FILE_NAME"),
|
this->GetOption("CPACK_PACKAGE_FILE_NAME"),
|
||||||
true)) {
|
true)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Problem copying the resource files" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,8 +149,9 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
|
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
|
||||||
<< "\" create -ov -fs HFS+ -format UDZO -srcfolder \""
|
<< "\" create -ov -fs HFS+ -format UDZO -srcfolder \""
|
||||||
<< diskImageDirectory << "\" \"" << packageFileNames[0] << "\"";
|
<< diskImageDirectory << "\" \"" << packageFileNames[0] << "\"";
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress disk image using command: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< dmgCmd.str() << std::endl);
|
"Compress disk image using command: " << dmgCmd.str()
|
||||||
|
<< std::endl);
|
||||||
// since we get random dashboard failures with this one
|
// since we get random dashboard failures with this one
|
||||||
// try running it more than once
|
// try running it more than once
|
||||||
int retVal = 1;
|
int retVal = 1;
|
||||||
@@ -170,7 +173,8 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << 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
|
<< dmgCmd.str() << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors"
|
<< "Please check " << tmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -182,13 +186,13 @@ int cmCPackOSXX11Generator::PackageFiles()
|
|||||||
|
|
||||||
int cmCPackOSXX11Generator::InitializeInternal()
|
int cmCPackOSXX11Generator::InitializeInternal()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackOSXX11Generator::Initialize()"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"cmCPackOSXX11Generator::Initialize()" << std::endl);
|
||||||
std::vector<std::string> path;
|
std::vector<std::string> path;
|
||||||
std::string pkgPath = cmSystemTools::FindProgram("hdiutil", path, false);
|
std::string pkgPath = cmSystemTools::FindProgram("hdiutil", path, false);
|
||||||
if (pkgPath.empty()) {
|
if (pkgPath.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot find hdiutil compiler" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
||||||
@@ -263,8 +267,9 @@ bool cmCPackOSXX11Generator::CopyResourcePlistFile(
|
|||||||
destFileName += "/";
|
destFileName += "/";
|
||||||
destFileName += outputFileName;
|
destFileName += outputFileName;
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< inFileName << " to " << destFileName << std::endl);
|
"Configure file: " << inFileName << " to " << destFileName
|
||||||
|
<< std::endl);
|
||||||
this->ConfigureFile(inFileName.c_str(), destFileName.c_str(), copyOnly);
|
this->ConfigureFile(inFileName.c_str(), destFileName.c_str(), copyOnly);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ bool cmCPackPKGGenerator::SupportsComponentInstallation() const
|
|||||||
|
|
||||||
int cmCPackPKGGenerator::InitializeInternal()
|
int cmCPackPKGGenerator::InitializeInternal()
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackPKGGenerator::Initialize()"
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"cmCPackPKGGenerator::Initialize()" << std::endl);
|
||||||
|
|
||||||
return this->Superclass::InitializeInternal();
|
return this->Superclass::InitializeInternal();
|
||||||
}
|
}
|
||||||
@@ -52,8 +52,9 @@ void cmCPackPKGGenerator::WriteDistributionFile(const char* metapackageFile)
|
|||||||
std::string distributionTemplate =
|
std::string distributionTemplate =
|
||||||
this->FindTemplate("CPack.distribution.dist.in");
|
this->FindTemplate("CPack.distribution.dist.in");
|
||||||
if (distributionTemplate.empty()) {
|
if (distributionTemplate.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find input file: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< distributionTemplate << std::endl);
|
"Cannot find input file: " << distributionTemplate
|
||||||
|
<< std::endl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,23 +271,26 @@ bool cmCPackPKGGenerator::CopyCreateResourceFile(const std::string& name,
|
|||||||
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
|
std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname;
|
||||||
const char* inFileName = this->GetOption(cpackVar);
|
const char* inFileName = this->GetOption(cpackVar);
|
||||||
if (!inFileName) {
|
if (!inFileName) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< cpackVar.c_str()
|
"CPack option: " << cpackVar.c_str()
|
||||||
<< " not specified. It should point to "
|
<< " not specified. It should point to "
|
||||||
<< (!name.empty() ? name : "<empty>") << ".rtf, " << name
|
<< (!name.empty() ? name : "<empty>")
|
||||||
<< ".html, or " << name << ".txt file" << std::endl);
|
<< ".rtf, " << name << ".html, or " << name
|
||||||
|
<< ".txt file" << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!cmSystemTools::FileExists(inFileName)) {
|
if (!cmSystemTools::FileExists(inFileName)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find "
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< (!name.empty() ? name : "<empty>")
|
"Cannot find " << (!name.empty() ? name : "<empty>")
|
||||||
<< " resource file: " << inFileName << std::endl);
|
<< " resource file: " << inFileName
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName);
|
std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName);
|
||||||
if (ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt") {
|
if (ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt") {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_ERROR, "Bad file extension specified: "
|
cmCPackLog::LOG_ERROR,
|
||||||
|
"Bad file extension specified: "
|
||||||
<< ext
|
<< ext
|
||||||
<< ". Currently only .rtfd, .rtf, .html, and .txt files allowed."
|
<< ". Currently only .rtfd, .rtf, .html, and .txt files allowed."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -330,8 +334,9 @@ bool cmCPackPKGGenerator::CopyResourcePlistFile(const std::string& name,
|
|||||||
destFileName += "/";
|
destFileName += "/";
|
||||||
destFileName += outName;
|
destFileName += outName;
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< inFileName << " to " << destFileName << std::endl);
|
"Configure file: " << inFileName << " to " << destFileName
|
||||||
|
<< std::endl);
|
||||||
this->ConfigureFile(inFileName.c_str(), destFileName.c_str());
|
this->ConfigureFile(inFileName.c_str(), destFileName.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,8 +251,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
|||||||
!this->CopyCreateResourceFile("Welcome", resDir) ||
|
!this->CopyCreateResourceFile("Welcome", resDir) ||
|
||||||
!this->CopyResourcePlistFile("Info.plist") ||
|
!this->CopyResourcePlistFile("Info.plist") ||
|
||||||
!this->CopyResourcePlistFile("Description.plist")) {
|
!this->CopyResourcePlistFile("Description.plist")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Problem copying the resource files" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +311,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
|
|||||||
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
ofs << "# Run command: " << dmgCmd.str() << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << 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
|
<< dmgCmd.str() << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors"
|
<< "Please check " << tmpFile << " for errors"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -357,8 +358,8 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
|||||||
} else {
|
} else {
|
||||||
pkgPath = cmSystemTools::FindProgram("PackageMaker", paths, false);
|
pkgPath = cmSystemTools::FindProgram("PackageMaker", paths, false);
|
||||||
if (pkgPath.empty()) {
|
if (pkgPath.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find PackageMaker compiler"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot find PackageMaker compiler" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str());
|
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str());
|
||||||
@@ -415,12 +416,13 @@ int cmCPackPackageMakerGenerator::InitializeInternal()
|
|||||||
}
|
}
|
||||||
this->PackageMakerVersion = atof(rexVersion.match(1).c_str());
|
this->PackageMakerVersion = atof(rexVersion.match(1).c_str());
|
||||||
if (this->PackageMakerVersion < 1.0) {
|
if (this->PackageMakerVersion < 1.0) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Require PackageMaker 1.0 or higher"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Require PackageMaker 1.0 or higher" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< this->PackageMakerVersion << std::endl);
|
"PackageMaker version is: " << this->PackageMakerVersion
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
// Determine the package compatibility version. If it wasn't
|
// Determine the package compatibility version. If it wasn't
|
||||||
// specified by the user, we define it based on which features the
|
// 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;
|
std::vector<std::string> no_paths;
|
||||||
pkgPath = cmSystemTools::FindProgram("hdiutil", no_paths, false);
|
pkgPath = cmSystemTools::FindProgram("hdiutil", no_paths, false);
|
||||||
if (pkgPath.empty()) {
|
if (pkgPath.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot find hdiutil compiler" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE",
|
||||||
@@ -470,17 +472,18 @@ bool cmCPackPackageMakerGenerator::RunPackageMaker(const char* command,
|
|||||||
bool res = cmSystemTools::RunSingleCommand(
|
bool res = cmSystemTools::RunSingleCommand(
|
||||||
command, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
|
command, &output, &output, &retVal, nullptr, this->GeneratorVerbose,
|
||||||
cmDuration::zero());
|
cmDuration::zero());
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker"
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< std::endl);
|
"Done running package maker" << std::endl);
|
||||||
if (!res || retVal) {
|
if (!res || retVal) {
|
||||||
cmGeneratedFileStream ofs(tmpFile.c_str());
|
cmGeneratedFileStream ofs(tmpFile.c_str());
|
||||||
ofs << "# Run command: " << command << std::endl
|
ofs << "# Run command: " << command << std::endl
|
||||||
<< "# Output:" << std::endl
|
<< "# Output:" << std::endl
|
||||||
<< output << std::endl;
|
<< output << std::endl;
|
||||||
cmCPackLogger(
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
cmCPackLog::LOG_ERROR, "Problem running PackageMaker command: "
|
"Problem running PackageMaker command: "
|
||||||
<< command << std::endl
|
<< command << std::endl
|
||||||
<< "Please check " << tmpFile << " for errors" << std::endl);
|
<< "Please check " << tmpFile << " for errors"
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// sometimes the command finishes but the directory is not yet
|
// sometimes the command finishes but the directory is not yet
|
||||||
@@ -505,8 +508,9 @@ bool cmCPackPackageMakerGenerator::GenerateComponentPackage(
|
|||||||
const char* packageFile, const char* packageDir,
|
const char* packageFile, const char* packageDir,
|
||||||
const cmCPackComponent& component)
|
const cmCPackComponent& component)
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< packageFile << std::endl);
|
"- Building component package: " << packageFile
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
// The command that will be used to run PackageMaker
|
// The command that will be used to run PackageMaker
|
||||||
std::ostringstream pkgCmd;
|
std::ostringstream pkgCmd;
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ int cmCPackProductBuildGenerator::PackageFiles()
|
|||||||
this->GetOption("CPACK_PRODUCTBUILD_RESOURCES_DIR");
|
this->GetOption("CPACK_PRODUCTBUILD_RESOURCES_DIR");
|
||||||
|
|
||||||
if (!cmSystemTools::CopyADirectory(userResDir, resDir)) {
|
if (!cmSystemTools::CopyADirectory(userResDir, resDir)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Problem copying the resource files" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -121,16 +121,16 @@ int cmCPackProductBuildGenerator::InitializeInternal()
|
|||||||
std::string program =
|
std::string program =
|
||||||
cmSystemTools::FindProgram("pkgbuild", no_paths, false);
|
cmSystemTools::FindProgram("pkgbuild", no_paths, false);
|
||||||
if (program.empty()) {
|
if (program.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find pkgbuild executable"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot find pkgbuild executable" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_PKGBUILD", program.c_str());
|
||||||
|
|
||||||
program = cmSystemTools::FindProgram("productbuild", no_paths, false);
|
program = cmSystemTools::FindProgram("productbuild", no_paths, false);
|
||||||
if (program.empty()) {
|
if (program.empty()) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find productbuild executable"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Cannot find productbuild executable" << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program.c_str());
|
this->SetOptionIfNotSet("CPACK_COMMAND_PRODUCTBUILD", program.c_str());
|
||||||
@@ -172,8 +172,9 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
|
|||||||
packageFile += '/';
|
packageFile += '/';
|
||||||
packageFile += packageFileName;
|
packageFile += packageFileName;
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Building component package: "
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
<< packageFile << std::endl);
|
"- Building component package: " << packageFile
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
const char* comp_name = component ? component->Name.c_str() : nullptr;
|
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",
|
this->SetOption("CPACK_RPM_PACKAGE_COMPONENT_PART_PATH",
|
||||||
component_path.c_str());
|
component_path.c_str());
|
||||||
if (!this->ReadListFile("CPackRPM.cmake")) {
|
if (!this->ReadListFile("CPackRPM.cmake")) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error while execution CPackRPM.cmake" << std::endl);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -165,7 +165,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shouldSet) {
|
if (shouldSet) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Setting "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Setting "
|
||||||
<< "CPACK_RPM_DEBUGINFO_PACKAGE because "
|
<< "CPACK_RPM_DEBUGINFO_PACKAGE because "
|
||||||
<< "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but "
|
<< "CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE is set but "
|
||||||
<< " none of the "
|
<< " none of the "
|
||||||
@@ -203,8 +204,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< compGIt->first << std::endl);
|
"Packaging component group: " << compGIt->first
|
||||||
|
<< std::endl);
|
||||||
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
||||||
}
|
}
|
||||||
// Handle Orphan components (components not belonging to any groups)
|
// Handle Orphan components (components not belonging to any groups)
|
||||||
@@ -226,7 +228,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Component <"
|
||||||
<< compIt->second.Name
|
<< compIt->second.Name
|
||||||
<< "> does not belong to any group, package it separately."
|
<< "> does not belong to any group, package it separately."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -242,7 +245,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
} else if (mainCompIt != this->Components.end()) {
|
} else if (mainCompIt != this->Components.end()) {
|
||||||
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"CPACK_RPM_MAIN_COMPONENT set"
|
||||||
<< " to non existing component.\n");
|
<< " to non existing component.\n");
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
@@ -276,7 +280,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
if (mainCompIt != this->Components.end()) {
|
if (mainCompIt != this->Components.end()) {
|
||||||
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
retval &= PackageOnePack(initialTopLevel, mainCompIt->first);
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "CPACK_RPM_MAIN_COMPONENT set"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
|
"CPACK_RPM_MAIN_COMPONENT set"
|
||||||
<< " to non existing component.\n");
|
<< " to non existing component.\n");
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
@@ -290,8 +295,9 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
|
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
|
||||||
for (compGIt = this->ComponentGroups.begin();
|
for (compGIt = this->ComponentGroups.begin();
|
||||||
compGIt != this->ComponentGroups.end(); ++compGIt) {
|
compGIt != this->ComponentGroups.end(); ++compGIt) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
|
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
|
||||||
<< compGIt->first << std::endl);
|
"Packaging component group: " << compGIt->first
|
||||||
|
<< std::endl);
|
||||||
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
retval &= PackageOnePack(initialTopLevel, compGIt->first);
|
||||||
}
|
}
|
||||||
// Handle Orphan components (components not belonging to any groups)
|
// 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?
|
// Does the component belong to a group?
|
||||||
if (compIt->second.Group == nullptr) {
|
if (compIt->second.Group == nullptr) {
|
||||||
cmCPackLogger(
|
cmCPackLogger(
|
||||||
cmCPackLog::LOG_VERBOSE, "Component <"
|
cmCPackLog::LOG_VERBOSE,
|
||||||
|
"Component <"
|
||||||
<< compIt->second.Name
|
<< compIt->second.Name
|
||||||
<< "> does not belong to any group, package it separately."
|
<< "> does not belong to any group, package it separately."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -320,7 +327,8 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(
|
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"
|
<< " it is mandatory with CPACK_RPM_DEBUGINFO_SINGLE_PACKAGE"
|
||||||
<< " being set.\n");
|
<< " being set.\n");
|
||||||
retval = 0;
|
retval = 0;
|
||||||
@@ -380,8 +388,8 @@ int cmCPackRPMGenerator::PackageComponentsAllInOne(
|
|||||||
if (this->ReadListFile("CPackRPM.cmake")) {
|
if (this->ReadListFile("CPackRPM.cmake")) {
|
||||||
AddGeneratedPackageNames();
|
AddGeneratedPackageNames();
|
||||||
} else {
|
} else {
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Error while execution CPackRPM.cmake"
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"Error while execution CPackRPM.cmake" << std::endl);
|
||||||
retval = 0;
|
retval = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ int cmCPackSTGZGenerator::PackageFiles()
|
|||||||
S_IRGRP | S_IWGRP | S_IXGRP |
|
S_IRGRP | S_IWGRP | S_IXGRP |
|
||||||
S_IROTH | S_IWOTH | S_IXOTH
|
S_IROTH | S_IWOTH | S_IXOTH
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,8 @@ int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os)
|
|||||||
++ptr;
|
++ptr;
|
||||||
}
|
}
|
||||||
counter++;
|
counter++;
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Number of lines: " << counter
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
<< std::endl);
|
"Number of lines: " << counter << std::endl);
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
sprintf(buffer, "%d", counter);
|
sprintf(buffer, "%d", counter);
|
||||||
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
cmSystemTools::ReplaceString(res, headerLengthTag, buffer);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(_WIN32) && defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include "cmsys/ConsoleBuf.hxx"
|
# include "cmsys/ConsoleBuf.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "cmCPackGenerator.h"
|
#include "cmCPackGenerator.h"
|
||||||
@@ -82,8 +82,9 @@ int cpackDefinitionArgument(const char* argument, const char* cValue,
|
|||||||
std::string key = value.substr(0, pos);
|
std::string key = value.substr(0, pos);
|
||||||
value = value.c_str() + pos + 1;
|
value = value.c_str() + pos + 1;
|
||||||
def->Map[key] = value;
|
def->Map[key] = value;
|
||||||
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: "
|
cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG,
|
||||||
<< key << " to \"" << value << "\"" << std::endl);
|
"Set CPack variable: " << key << " to \"" << value << "\""
|
||||||
|
<< std::endl);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -320,8 +321,8 @@ int main(int argc, char const* const* argv)
|
|||||||
}
|
}
|
||||||
const char* genList = globalMF.GetDefinition("CPACK_GENERATOR");
|
const char* genList = globalMF.GetDefinition("CPACK_GENERATOR");
|
||||||
if (!genList) {
|
if (!genList) {
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "CPack generator not specified"
|
cmCPack_Log(&log, cmCPackLog::LOG_ERROR,
|
||||||
<< std::endl);
|
"CPack generator not specified" << std::endl);
|
||||||
} else {
|
} else {
|
||||||
std::vector<std::string> generatorsVector;
|
std::vector<std::string> generatorsVector;
|
||||||
cmSystemTools::ExpandListArgument(genList, generatorsVector);
|
cmSystemTools::ExpandListArgument(genList, generatorsVector);
|
||||||
@@ -384,8 +385,9 @@ int main(int argc, char const* const* argv)
|
|||||||
}
|
}
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
const char* projName = mf->GetDefinition("CPACK_PACKAGE_NAME");
|
const char* projName = mf->GetDefinition("CPACK_PACKAGE_NAME");
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "Use generator: "
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
<< cpackGenerator->GetNameOfClass() << std::endl);
|
"Use generator: " << cpackGenerator->GetNameOfClass()
|
||||||
|
<< std::endl);
|
||||||
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
|
||||||
"For project: " << projName << std::endl);
|
"For project: " << projName << std::endl);
|
||||||
|
|
||||||
|
|||||||
@@ -155,8 +155,9 @@ bool cmCTestBZR::NoteOldRevision()
|
|||||||
{
|
{
|
||||||
this->OldRevision = this->LoadInfo();
|
this->OldRevision = this->LoadInfo();
|
||||||
this->Log << "Revision before update: " << this->OldRevision << "\n";
|
this->Log << "Revision before update: " << this->OldRevision << "\n";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->OldRevision << "\n");
|
" Old revision of repository is: " << this->OldRevision
|
||||||
|
<< "\n");
|
||||||
this->PriorRev.Rev = this->OldRevision;
|
this->PriorRev.Rev = this->OldRevision;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -165,14 +166,16 @@ bool cmCTestBZR::NoteNewRevision()
|
|||||||
{
|
{
|
||||||
this->NewRevision = this->LoadInfo();
|
this->NewRevision = this->LoadInfo();
|
||||||
this->Log << "Revision after update: " << this->NewRevision << "\n";
|
this->Log << "Revision after update: " << this->NewRevision << "\n";
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->NewRevision << "\n");
|
" New revision of repository is: " << this->NewRevision
|
||||||
|
<< "\n");
|
||||||
this->Log << "URL = " << this->URL << "\n";
|
this->Log << "URL = " << this->URL << "\n";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
class cmCTestBZR::LogParser : public cmCTestVC::OutputLogger,
|
class cmCTestBZR::LogParser
|
||||||
private cmXMLParser
|
: public cmCTestVC::OutputLogger
|
||||||
|
, private cmXMLParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogParser(cmCTestBZR* bzr, const char* prefix)
|
LogParser(cmCTestBZR* bzr, const char* prefix)
|
||||||
|
|||||||
@@ -299,7 +299,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
this->ErrorWarningFileLineRegex.push_back(std::move(r));
|
this->ErrorWarningFileLineRegex.push_back(std::move(r));
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(
|
cmCTestLog(
|
||||||
this->CTest, ERROR_MESSAGE, "Problem Compiling regular expression: "
|
this->CTest, ERROR_MESSAGE,
|
||||||
|
"Problem Compiling regular expression: "
|
||||||
<< cmCTestWarningErrorFileLine[entry].RegularExpressionString
|
<< cmCTestWarningErrorFileLine[entry].RegularExpressionString
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@@ -331,8 +332,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
auto elapsed_time_start = std::chrono::steady_clock::now();
|
auto elapsed_time_start = std::chrono::steady_clock::now();
|
||||||
if (!this->StartLogFile("Build", ofs)) {
|
if (!this->StartLogFile("Build", ofs)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build log file"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot create build log file" << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create lists of regular expression strings for errors, error exceptions,
|
// Create lists of regular expression strings for errors, error exceptions,
|
||||||
@@ -352,7 +353,7 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]);
|
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) \
|
#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \
|
||||||
regexes.clear(); \
|
regexes.clear(); \
|
||||||
@@ -452,8 +453,8 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
// Generate XML output
|
// Generate XML output
|
||||||
cmGeneratedFileStream xofs;
|
cmGeneratedFileStream xofs;
|
||||||
if (!this->StartResultingXML(cmCTest::PartBuild, "Build", xofs)) {
|
if (!this->StartResultingXML(cmCTest::PartBuild, "Build", xofs)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build XML file"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot create build XML file" << std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmXMLWriter xml(xofs);
|
cmXMLWriter xml(xofs);
|
||||||
@@ -466,19 +467,20 @@ int cmCTestBuildHandler::ProcessHandler()
|
|||||||
this->GenerateXMLFooter(xml, elapsed_build_time);
|
this->GenerateXMLFooter(xml, elapsed_build_time);
|
||||||
|
|
||||||
if (res != cmsysProcess_State_Exited || retVal || this->TotalErrors > 0) {
|
if (res != cmsysProcess_State_Exited || retVal || this->TotalErrors > 0) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error(s) when building project"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Error(s) when building project" << std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display message about number of errors and warnings
|
// Display message about number of errors and warnings
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->TotalErrors
|
" " << this->TotalErrors
|
||||||
<< (this->TotalErrors >= this->MaxErrors ? " or more" : "")
|
<< (this->TotalErrors >= this->MaxErrors ? " or more" : "")
|
||||||
<< " Compiler errors" << std::endl);
|
<< " Compiler errors" << std::endl);
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " "
|
cmCTestLog(
|
||||||
<< this->TotalWarnings
|
this->CTest, HANDLER_OUTPUT,
|
||||||
<< (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
|
" " << this->TotalWarnings
|
||||||
<< " Compiler warnings" << std::endl);
|
<< (this->TotalWarnings >= this->MaxWarnings ? " or more" : "")
|
||||||
|
<< " Compiler warnings" << std::endl);
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
@@ -779,8 +781,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
|||||||
}
|
}
|
||||||
argv.push_back(nullptr);
|
argv.push_back(nullptr);
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
this->Quiet);
|
"Run command:", this->Quiet);
|
||||||
for (char const* arg : argv) {
|
for (char const* arg : argv) {
|
||||||
if (!arg) {
|
if (!arg) {
|
||||||
break;
|
break;
|
||||||
@@ -812,7 +814,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
|||||||
cmProcessOutput processOutput(encoding);
|
cmProcessOutput processOutput(encoding);
|
||||||
std::string strdata;
|
std::string strdata;
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this->CTest, HANDLER_PROGRESS_OUTPUT, " Each symbol represents "
|
this->CTest, HANDLER_PROGRESS_OUTPUT,
|
||||||
|
" Each symbol represents "
|
||||||
<< tick_len << " bytes of output." << std::endl
|
<< tick_len << " bytes of output." << std::endl
|
||||||
<< (this->UseCTestLaunch
|
<< (this->UseCTestLaunch
|
||||||
? ""
|
? ""
|
||||||
@@ -868,7 +871,8 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
|||||||
&this->BuildProcessingQueue);
|
&this->BuildProcessingQueue);
|
||||||
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
|
this->ProcessBuffer(nullptr, 0, tick, tick_len, ofs,
|
||||||
&this->BuildProcessingErrorQueue);
|
&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"
|
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -921,8 +925,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
|
|||||||
errorwarning.Error = true;
|
errorwarning.Error = true;
|
||||||
this->ErrorsAndWarnings.push_back(std::move(errorwarning));
|
this->ErrorsAndWarnings.push_back(std::move(errorwarning));
|
||||||
this->TotalErrors++;
|
this->TotalErrors++;
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
"There was an error: " << cmsysProcess_GetErrorString(cp)
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
@@ -1049,7 +1054,8 @@ void cmCTestBuildHandler::ProcessBuffer(const char* data, size_t length,
|
|||||||
this->LastTickChar, this->Quiet);
|
this->LastTickChar, this->Quiet);
|
||||||
tickDisplayed = true;
|
tickDisplayed = true;
|
||||||
if (tick % tick_line_len == 0 && tick > 0) {
|
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"
|
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " ",
|
<< " ",
|
||||||
@@ -1103,7 +1109,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
for (cmsys::RegularExpression& rx : this->ErrorExceptionRegex) {
|
for (cmsys::RegularExpression& rx : this->ErrorExceptionRegex) {
|
||||||
if (rx.find(data)) {
|
if (rx.find(data)) {
|
||||||
errorLine = 0;
|
errorLine = 0;
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, " Not an error Line: "
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
" Not an error Line: "
|
||||||
<< data << " (matches: "
|
<< data << " (matches: "
|
||||||
<< this->CustomErrorExceptions[wrxCnt] << ")"
|
<< this->CustomErrorExceptions[wrxCnt] << ")"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
@@ -1119,7 +1126,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
for (cmsys::RegularExpression& rx : this->WarningMatchRegex) {
|
for (cmsys::RegularExpression& rx : this->WarningMatchRegex) {
|
||||||
if (rx.find(data)) {
|
if (rx.find(data)) {
|
||||||
warningLine = 1;
|
warningLine = 1;
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, " Warning Line: "
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
" Warning Line: "
|
||||||
<< data << " (matches: "
|
<< data << " (matches: "
|
||||||
<< this->CustomWarningMatches[wrxCnt] << ")"
|
<< this->CustomWarningMatches[wrxCnt] << ")"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
@@ -1134,7 +1142,8 @@ int cmCTestBuildHandler::ProcessSingleLine(const char* data)
|
|||||||
for (cmsys::RegularExpression& rx : this->WarningExceptionRegex) {
|
for (cmsys::RegularExpression& rx : this->WarningExceptionRegex) {
|
||||||
if (rx.find(data)) {
|
if (rx.find(data)) {
|
||||||
warningLine = 0;
|
warningLine = 0;
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, " Not a warning Line: "
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
" Not a warning Line: "
|
||||||
<< data << " (matches: "
|
<< data << " (matches: "
|
||||||
<< this->CustomWarningExceptions[wrxCnt] << ")"
|
<< this->CustomWarningExceptions[wrxCnt] << ")"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
|
|||||||
@@ -134,8 +134,9 @@ private:
|
|||||||
|
|
||||||
bool ProcessLine() override
|
bool ProcessLine() override
|
||||||
{
|
{
|
||||||
if (this->Line == ("======================================="
|
if (this->Line ==
|
||||||
"======================================")) {
|
("======================================="
|
||||||
|
"======================================")) {
|
||||||
// This line ends the revision list.
|
// This line ends the revision list.
|
||||||
if (this->Section == SectionRevisions) {
|
if (this->Section == SectionRevisions) {
|
||||||
this->FinishRevision();
|
this->FinishRevision();
|
||||||
|
|||||||
@@ -51,8 +51,8 @@ int cmCTestConfigureHandler::ProcessHandler()
|
|||||||
if (!this->CTest->GetShowOnly()) {
|
if (!this->CTest->GetShowOnly()) {
|
||||||
cmGeneratedFileStream os;
|
cmGeneratedFileStream os;
|
||||||
if (!this->StartResultingXML(cmCTest::PartConfigure, "Configure", os)) {
|
if (!this->StartResultingXML(cmCTest::PartConfigure, "Configure", os)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open configure file"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot open configure file" << std::endl);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
std::string start_time = this->CTest->CurrentTime();
|
std::string start_time = this->CTest->CurrentTime();
|
||||||
|
|||||||
@@ -197,10 +197,10 @@ bool cmCTestCoverageHandler::ShouldIDoCoverage(std::string const& file,
|
|||||||
|
|
||||||
for (cmsys::RegularExpression& rx : this->CustomCoverageExcludeRegex) {
|
for (cmsys::RegularExpression& rx : this->CustomCoverageExcludeRegex) {
|
||||||
if (rx.find(file)) {
|
if (rx.find(file)) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File "
|
cmCTestOptionalLog(
|
||||||
<< file << " is excluded in CTestCustom.ctest"
|
this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< std::endl;
|
" File " << file << " is excluded in CTestCustom.ctest" << std::endl;
|
||||||
, this->Quiet);
|
, this->Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -391,8 +391,8 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
|
|
||||||
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
||||||
covSumFile)) {
|
covSumFile)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot open coverage summary file." << std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
|
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
|
||||||
@@ -429,9 +429,10 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
this->Quiet);
|
this->Quiet);
|
||||||
file_count++;
|
file_count++;
|
||||||
if (file_count % 50 == 0) {
|
if (file_count % 50 == 0) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " processed: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< file_count << " out of "
|
" processed: " << file_count << " out of "
|
||||||
<< cont.TotalCoverage.size() << std::endl,
|
<< cont.TotalCoverage.size()
|
||||||
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " ", this->Quiet);
|
||||||
}
|
}
|
||||||
@@ -524,8 +525,9 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
float cper = 0;
|
float cper = 0;
|
||||||
float cmet = 0;
|
float cmet = 0;
|
||||||
if (tested + untested > 0) {
|
if (tested + untested > 0) {
|
||||||
cper = (100 * SAFEDIV(static_cast<float>(tested),
|
cper = (100 *
|
||||||
static_cast<float>(tested + untested)));
|
SAFEDIV(static_cast<float>(tested),
|
||||||
|
static_cast<float>(tested + untested)));
|
||||||
cmet = (SAFEDIV(static_cast<float>(tested + 10),
|
cmet = (SAFEDIV(static_cast<float>(tested + 10),
|
||||||
static_cast<float>(tested + untested + 10)));
|
static_cast<float>(tested + untested + 10)));
|
||||||
}
|
}
|
||||||
@@ -629,14 +631,14 @@ int cmCTestCoverageHandler::ProcessHandler()
|
|||||||
covSumXML.EndElement(); // Coverage
|
covSumXML.EndElement(); // Coverage
|
||||||
this->CTest->EndXML(covSumXML);
|
this->CTest->EndXML(covSumXML);
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, ""
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::endl
|
"" << std::endl
|
||||||
<< "\tCovered LOC: " << total_tested << std::endl
|
<< "\tCovered LOC: " << total_tested << std::endl
|
||||||
<< "\tNot covered LOC: " << total_untested << std::endl
|
<< "\tNot covered LOC: " << total_untested << std::endl
|
||||||
<< "\tTotal LOC: " << total_lines << std::endl
|
<< "\tTotal LOC: " << total_lines << std::endl
|
||||||
<< "\tPercentage Coverage: "
|
<< "\tPercentage Coverage: "
|
||||||
<< std::setiosflags(std::ios::fixed) << std::setprecision(2)
|
<< std::setiosflags(std::ios::fixed) << std::setprecision(2)
|
||||||
<< (percent_coverage) << "%" << std::endl);
|
<< (percent_coverage) << "%" << std::endl);
|
||||||
|
|
||||||
ofs << "\tCovered LOC: " << total_tested << std::endl
|
ofs << "\tCovered LOC: " << total_tested << std::endl
|
||||||
<< "\tNot covered LOC: " << total_untested << 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
|
// Compare file names: fnc(fn1) == fnc(fn2) // fnc == file name compare
|
||||||
//
|
//
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define fnc(s) cmSystemTools::LowerCase(s)
|
# define fnc(s) cmSystemTools::LowerCase(s)
|
||||||
#else
|
#else
|
||||||
#define fnc(s) s
|
# define fnc(s) s
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool IsFileInDir(const std::string& infile, const std::string& indir)
|
bool IsFileInDir(const std::string& infile, const std::string& indir)
|
||||||
@@ -1045,7 +1047,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (retVal != 0) {
|
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);
|
<< retVal << " while processing: " << f << std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << cont->Error << std::endl);
|
"Command produced error: " << cont->Error << std::endl);
|
||||||
@@ -1077,8 +1080,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 1;
|
gcovStyle = 1;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 1) {
|
if (gcovStyle != 1) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e1"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e1" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1090,8 +1093,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 1;
|
gcovStyle = 1;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 1) {
|
if (gcovStyle != 1) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e2"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e2" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1102,8 +1105,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e3"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e3" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1115,8 +1118,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e4"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e4" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1125,8 +1128,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e5"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e5" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1137,8 +1140,8 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e6"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e6" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1152,37 +1155,40 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e7"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e7" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, WARNING, "Warning: Cannot open file: "
|
cmCTestOptionalLog(this->CTest, WARNING,
|
||||||
<< st2re5.match(1) << std::endl,
|
"Warning: Cannot open file: " << st2re5.match(1)
|
||||||
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
} else if (st2re6.find(line.c_str())) {
|
} else if (st2re6.find(line.c_str())) {
|
||||||
if (gcovStyle == 0) {
|
if (gcovStyle == 0) {
|
||||||
gcovStyle = 2;
|
gcovStyle = 2;
|
||||||
}
|
}
|
||||||
if (gcovStyle != 2) {
|
if (gcovStyle != 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style e8"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Unknown gcov output style e8" << std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, WARNING, "Warning: File: "
|
cmCTestOptionalLog(this->CTest, WARNING,
|
||||||
<< st2re6.match(1) << " is newer than "
|
"Warning: File: " << st2re6.match(1)
|
||||||
<< st2re6.match(2) << std::endl,
|
<< " is newer than "
|
||||||
|
<< st2re6.match(2) << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
} else {
|
} else {
|
||||||
// gcov 4.7 can have output lines saying "No executable lines" and
|
// gcov 4.7 can have output lines saying "No executable lines" and
|
||||||
// "Removing 'filename.gcov'"... Don't log those as "errors."
|
// "Removing 'filename.gcov'"... Don't log those as "errors."
|
||||||
if (line != "No executable lines" &&
|
if (line != "No executable lines" &&
|
||||||
!cmSystemTools::StringStartsWith(line.c_str(), "Removing ")) {
|
!cmSystemTools::StringStartsWith(line.c_str(), "Removing ")) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output line: ["
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< line << "]" << std::endl);
|
"Unknown gcov output line: [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
cont->Error++;
|
cont->Error++;
|
||||||
// abort();
|
// abort();
|
||||||
}
|
}
|
||||||
@@ -1418,7 +1424,8 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (retVal != 0) {
|
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);
|
<< retVal << " while processing: " << f << std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Command produced error: " << cont->Error << std::endl);
|
"Command produced error: " << cont->Error << std::endl);
|
||||||
@@ -1817,7 +1824,8 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
|
|||||||
"run covbr: " << std::endl, this->Quiet);
|
"run covbr: " << std::endl, this->Quiet);
|
||||||
|
|
||||||
if (!this->RunBullseyeCommand(cont, "covbr", nullptr, outputFile)) {
|
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");
|
<< "\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -1981,8 +1989,8 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
|
|||||||
cmXMLWriter xml(covSumFile);
|
cmXMLWriter xml(covSumFile);
|
||||||
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
if (!this->StartResultingXML(cmCTest::PartCoverage, "Coverage",
|
||||||
covSumFile)) {
|
covSumFile)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open coverage summary file."
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot open coverage summary file." << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
this->CTest->StartXML(xml, this->AppendXML);
|
this->CTest->StartXML(xml, this->AppendXML);
|
||||||
@@ -2198,7 +2206,8 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine(
|
|||||||
}
|
}
|
||||||
// should be at the end now
|
// should be at the end now
|
||||||
if (pos != std::string::npos) {
|
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");
|
<< inputLine << " last pos not npos = " << pos << "\n");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -175,7 +175,8 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
|
|||||||
"Curl debug: [" << curlDebug << "]\n", this->Quiet);
|
"Curl debug: [" << curlDebug << "]\n", this->Quiet);
|
||||||
}
|
}
|
||||||
if (response.empty()) {
|
if (response.empty()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "No response from server.\n"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"No response from server.\n"
|
||||||
<< curlDebug);
|
<< curlDebug);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -186,7 +187,8 @@ bool cmCTestCurl::HttpRequest(std::string const& url,
|
|||||||
std::string const& fields, std::string& response)
|
std::string const& fields, std::string& response)
|
||||||
{
|
{
|
||||||
response.clear();
|
response.clear();
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, "HttpRequest\n"
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"HttpRequest\n"
|
||||||
<< "url: " << url << "\n"
|
<< "url: " << url << "\n"
|
||||||
<< "fields " << fields << "\n",
|
<< "fields " << fields << "\n",
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
|
|||||||
@@ -70,8 +70,9 @@ std::string cmCTestGIT::GetWorkingRevision()
|
|||||||
bool cmCTestGIT::NoteOldRevision()
|
bool cmCTestGIT::NoteOldRevision()
|
||||||
{
|
{
|
||||||
this->OldRevision = this->GetWorkingRevision();
|
this->OldRevision = this->GetWorkingRevision();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->OldRevision << "\n");
|
" Old revision of repository is: " << this->OldRevision
|
||||||
|
<< "\n");
|
||||||
this->PriorRev.Rev = this->OldRevision;
|
this->PriorRev.Rev = this->OldRevision;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -79,8 +80,9 @@ bool cmCTestGIT::NoteOldRevision()
|
|||||||
bool cmCTestGIT::NoteNewRevision()
|
bool cmCTestGIT::NoteNewRevision()
|
||||||
{
|
{
|
||||||
this->NewRevision = this->GetWorkingRevision();
|
this->NewRevision = this->GetWorkingRevision();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->NewRevision << "\n");
|
" New revision of repository is: " << this->NewRevision
|
||||||
|
<< "\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,9 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part,
|
|||||||
}
|
}
|
||||||
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(),
|
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), ostr.str(),
|
||||||
xofs, true)) {
|
xofs, true)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create resulting XML file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< ostr.str() << std::endl);
|
"Cannot create resulting XML file: " << ostr.str()
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->CTest->AddSubmitFile(part, ostr.str().c_str());
|
this->CTest->AddSubmitFile(part, ostr.str().c_str());
|
||||||
|
|||||||
@@ -107,8 +107,9 @@ std::string cmCTestHG::GetWorkingRevision()
|
|||||||
bool cmCTestHG::NoteOldRevision()
|
bool cmCTestHG::NoteOldRevision()
|
||||||
{
|
{
|
||||||
this->OldRevision = this->GetWorkingRevision();
|
this->OldRevision = this->GetWorkingRevision();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->OldRevision << "\n");
|
" Old revision of repository is: " << this->OldRevision
|
||||||
|
<< "\n");
|
||||||
this->PriorRev.Rev = this->OldRevision;
|
this->PriorRev.Rev = this->OldRevision;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -116,8 +117,9 @@ bool cmCTestHG::NoteOldRevision()
|
|||||||
bool cmCTestHG::NoteNewRevision()
|
bool cmCTestHG::NoteNewRevision()
|
||||||
{
|
{
|
||||||
this->NewRevision = this->GetWorkingRevision();
|
this->NewRevision = this->GetWorkingRevision();
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->NewRevision << "\n");
|
" New revision of repository is: " << this->NewRevision
|
||||||
|
<< "\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,8 +159,9 @@ bool cmCTestHG::UpdateImpl()
|
|||||||
return this->RunUpdateCommand(&hg_update[0], &out, &err);
|
return this->RunUpdateCommand(&hg_update[0], &out, &err);
|
||||||
}
|
}
|
||||||
|
|
||||||
class cmCTestHG::LogParser : public cmCTestVC::OutputLogger,
|
class cmCTestHG::LogParser
|
||||||
private cmXMLParser
|
: public cmCTestVC::OutputLogger
|
||||||
|
, private cmXMLParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogParser(cmCTestHG* hg, const char* prefix)
|
LogParser(cmCTestHG* hg, const char* prefix)
|
||||||
@@ -168,6 +171,7 @@ public:
|
|||||||
this->InitializeParser();
|
this->InitializeParser();
|
||||||
}
|
}
|
||||||
~LogParser() override { this->CleanupParser(); }
|
~LogParser() override { this->CleanupParser(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmCTestHG* HG;
|
cmCTestHG* HG;
|
||||||
|
|
||||||
|
|||||||
@@ -158,13 +158,14 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
"BuildDirectory", cmSystemTools::CollapseFullPath(bdir).c_str(),
|
"BuildDirectory", cmSystemTools::CollapseFullPath(bdir).c_str(),
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CTEST_BINARY_DIRECTORY not set"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl;);
|
"CTEST_BINARY_DIRECTORY not set" << std::endl;);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->Values[ct_SOURCE]) {
|
if (this->Values[ct_SOURCE]) {
|
||||||
cmCTestLog(this->CTest, DEBUG, "Set source directory to: "
|
cmCTestLog(this->CTest, DEBUG,
|
||||||
<< this->Values[ct_SOURCE] << std::endl);
|
"Set source directory to: " << this->Values[ct_SOURCE]
|
||||||
|
<< std::endl);
|
||||||
this->CTest->SetCTestConfiguration(
|
this->CTest->SetCTestConfiguration(
|
||||||
"SourceDirectory",
|
"SourceDirectory",
|
||||||
cmSystemTools::CollapseFullPath(this->Values[ct_SOURCE]).c_str(),
|
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;);
|
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
|
||||||
cmCTestGenericHandler* handler = this->InitializeHandler();
|
cmCTestGenericHandler* handler = this->InitializeHandler();
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot instantiate test handler "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< this->GetName() << std::endl);
|
"Cannot instantiate test handler " << this->GetName()
|
||||||
|
<< std::endl);
|
||||||
if (capureCMakeError) {
|
if (capureCMakeError) {
|
||||||
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
||||||
"-1");
|
"-1");
|
||||||
@@ -226,8 +228,8 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
if (capureCMakeError) {
|
if (capureCMakeError) {
|
||||||
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
this->Makefile->AddDefinition(this->Values[ct_CAPTURE_CMAKE_ERROR],
|
||||||
"-1");
|
"-1");
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, this->GetName()
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< " " << this->GetError() << "\n");
|
this->GetName() << " " << this->GetError() << "\n");
|
||||||
// return success because failure is recorded in CAPTURE_CMAKE_ERROR
|
// return success because failure is recorded in CAPTURE_CMAKE_ERROR
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -303,8 +305,8 @@ bool cmCTestHandlerCommand::CheckArgumentValue(std::string const& arg)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
this->Values[k] = arg.c_str();
|
this->Values[k] = arg.c_str();
|
||||||
cmCTestLog(this->CTest, DEBUG, "Set " << this->Arguments[k] << " to "
|
cmCTestLog(this->CTest, DEBUG,
|
||||||
<< arg << "\n");
|
"Set " << this->Arguments[k] << " to " << arg << "\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <fcntl.h> // for _O_BINARY
|
# include <fcntl.h> // for _O_BINARY
|
||||||
#include <io.h> // for _setmode
|
# include <io.h> // for _setmode
|
||||||
#include <stdio.h> // for std{out,err} and fileno
|
# include <stdio.h> // for std{out,err} and fileno
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
|
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)
|
static void xmlReportError(int line, const char* msg, void* data)
|
||||||
{
|
{
|
||||||
cmCTest* ctest = static_cast<cmCTest*>(data);
|
cmCTest* ctest = static_cast<cmCTest*>(data);
|
||||||
cmCTestLog(ctest, ERROR_MESSAGE, "Error parsing XML in stream at line "
|
cmCTestLog(ctest, ERROR_MESSAGE,
|
||||||
<< line << ": " << msg << std::endl);
|
"Error parsing XML in stream at line " << line << ": " << msg
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the xml file containing the results of last BoundsChecker run
|
// 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();
|
const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
|
||||||
std::string outname = result.Name + " ";
|
std::string outname = result.Name + " ";
|
||||||
outname.resize(maxTestNameWidth + 4, '.');
|
outname.resize(maxTestNameWidth + 4, '.');
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, cc + 1
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< "/" << total << " MemCheck: #"
|
cc + 1 << "/" << total << " MemCheck: #"
|
||||||
<< result.TestCount << ": " << outname
|
<< result.TestCount << ": " << outname
|
||||||
<< " Defects: " << memoryErrors << std::endl,
|
<< " Defects: " << memoryErrors << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
xml.StartElement("Log");
|
xml.StartElement("Log");
|
||||||
@@ -773,8 +774,9 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cc == this->ResultStrings.size()) {
|
if (cc == this->ResultStrings.size()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown Purify memory fault: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< pfW.match(1) << std::endl);
|
"Unknown Purify memory fault: " << pfW.match(1)
|
||||||
|
<< std::endl);
|
||||||
ostr << "*** Unknown Purify memory fault: " << pfW.match(1)
|
ostr << "*** Unknown Purify memory fault: " << pfW.match(1)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
@@ -918,11 +920,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput(
|
|||||||
break; // stop the copy of output if we are full
|
break; // stop the copy of output if we are full
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
this->CTest, DEBUG, "End test (elapsed: "
|
"End test (elapsed: "
|
||||||
<< cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
|
<< cmDurationTo<unsigned int>(
|
||||||
<< "s)" << std::endl,
|
std::chrono::steady_clock::now() - sttime)
|
||||||
this->Quiet);
|
<< "s)" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
log = ostr.str();
|
log = ostr.str();
|
||||||
this->DefectCount += defects;
|
this->DefectCount += defects;
|
||||||
return defects == 0;
|
return defects == 0;
|
||||||
@@ -963,11 +966,12 @@ bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput(
|
|||||||
results[err]++;
|
results[err]++;
|
||||||
defects++;
|
defects++;
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
this->CTest, DEBUG, "End test (elapsed: "
|
"End test (elapsed: "
|
||||||
<< cmDurationTo<unsigned int>(std::chrono::steady_clock::now() - sttime)
|
<< cmDurationTo<unsigned int>(
|
||||||
<< "s)" << std::endl,
|
std::chrono::steady_clock::now() - sttime)
|
||||||
this->Quiet);
|
<< "s)" << std::endl,
|
||||||
|
this->Quiet);
|
||||||
if (defects) {
|
if (defects) {
|
||||||
// only put the output of Bounds Checker if there were
|
// only put the output of Bounds Checker if there were
|
||||||
// errors or leaks detected
|
// errors or leaks detected
|
||||||
|
|||||||
@@ -124,8 +124,9 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int test)
|
|||||||
std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
|
std::chrono::system_clock::time_point stop_time = this->CTest->GetStopTime();
|
||||||
if (stop_time != std::chrono::system_clock::time_point() &&
|
if (stop_time != std::chrono::system_clock::time_point() &&
|
||||||
stop_time <= std::chrono::system_clock::now()) {
|
stop_time <= std::chrono::system_clock::now()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Stopping all tests."
|
"The stop time has been passed. "
|
||||||
|
"Stopping all tests."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
this->StopTimePassed = true;
|
this->StopTimePassed = true;
|
||||||
return false;
|
return false;
|
||||||
@@ -330,10 +331,10 @@ void cmCTestMultiProcessHandler::StartNextTests()
|
|||||||
bool testLoadOk = true;
|
bool testLoadOk = true;
|
||||||
if (this->TestLoad > 0) {
|
if (this->TestLoad > 0) {
|
||||||
if (processors <= spareLoad) {
|
if (processors <= spareLoad) {
|
||||||
cmCTestLog(this->CTest, DEBUG, "OK to run "
|
cmCTestLog(this->CTest, DEBUG,
|
||||||
<< GetName(test) << ", it requires " << processors
|
"OK to run " << GetName(test) << ", it requires "
|
||||||
<< " procs & system load is: " << systemLoad
|
<< processors << " procs & system load is: "
|
||||||
<< std::endl);
|
<< systemLoad << std::endl);
|
||||||
allTestsFailedTestLoadCheck = false;
|
allTestsFailedTestLoadCheck = false;
|
||||||
} else {
|
} else {
|
||||||
testLoadOk = false;
|
testLoadOk = false;
|
||||||
@@ -712,8 +713,8 @@ void cmCTestMultiProcessHandler::PrintTestList()
|
|||||||
|
|
||||||
if (!p.Labels.empty()) // print the labels
|
if (!p.Labels.empty()) // print the labels
|
||||||
{
|
{
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Labels:",
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
this->Quiet);
|
"Labels:", this->Quiet);
|
||||||
}
|
}
|
||||||
for (std::string const& label : p.Labels) {
|
for (std::string const& label : p.Labels) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " " << label,
|
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, this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
std::endl
|
||||||
<< "Total Tests: " << this->Total << std::endl,
|
<< "Total Tests: " << this->Total << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public:
|
|||||||
cmCTestTestHandler* GetTestHandler() { return this->TestHandler; }
|
cmCTestTestHandler* GetTestHandler() { return this->TestHandler; }
|
||||||
|
|
||||||
void SetQuiet(bool b) { this->Quiet = b; }
|
void SetQuiet(bool b) { this->Quiet = b; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Start the next test or tests as many as are allowed by
|
// Start the next test or tests as many as are allowed by
|
||||||
// ParallelLevel
|
// ParallelLevel
|
||||||
|
|||||||
@@ -372,8 +372,9 @@ bool cmCTestP4::NoteOldRevision()
|
|||||||
{
|
{
|
||||||
this->OldRevision = this->GetWorkingRevision();
|
this->OldRevision = this->GetWorkingRevision();
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Old revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->OldRevision << "\n");
|
" Old revision of repository is: " << this->OldRevision
|
||||||
|
<< "\n");
|
||||||
this->PriorRev.Rev = this->OldRevision;
|
this->PriorRev.Rev = this->OldRevision;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -382,8 +383,9 @@ bool cmCTestP4::NoteNewRevision()
|
|||||||
{
|
{
|
||||||
this->NewRevision = this->GetWorkingRevision();
|
this->NewRevision = this->GetWorkingRevision();
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " New revision of repository is: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< this->NewRevision << "\n");
|
" New revision of repository is: " << this->NewRevision
|
||||||
|
<< "\n");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +400,8 @@ bool cmCTestP4::LoadRevisions()
|
|||||||
// If any revision is unknown it means we couldn't contact the server.
|
// If any revision is unknown it means we couldn't contact the server.
|
||||||
// Do not process updates
|
// Do not process updates
|
||||||
if (this->OldRevision == "<unknown>" || this->NewRevision == "<unknown>") {
|
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");
|
<< "is unknown. No repository changes will be reported.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ cmCTestRunTest::cmCTestRunTest(cmCTestMultiProcessHandler& multiHandler)
|
|||||||
|
|
||||||
void cmCTestRunTest::CheckOutput(std::string const& line)
|
void cmCTestRunTest::CheckOutput(std::string const& line)
|
||||||
{
|
{
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->GetIndex()
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< ": " << line << std::endl);
|
this->GetIndex() << ": " << line << std::endl);
|
||||||
this->ProcessOutput += line;
|
this->ProcessOutput += line;
|
||||||
this->ProcessOutput += "\n";
|
this->ProcessOutput += "\n";
|
||||||
|
|
||||||
@@ -50,7 +50,8 @@ void cmCTestRunTest::CheckOutput(std::string const& line)
|
|||||||
if (!this->TestProperties->TimeoutRegularExpressions.empty()) {
|
if (!this->TestProperties->TimeoutRegularExpressions.empty()) {
|
||||||
for (auto& reg : this->TestProperties->TimeoutRegularExpressions) {
|
for (auto& reg : this->TestProperties->TimeoutRegularExpressions) {
|
||||||
if (reg.first.find(this->ProcessOutput.c_str())) {
|
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 "
|
<< "Test timeout changed to "
|
||||||
<< std::chrono::duration_cast<std::chrono::seconds>(
|
<< std::chrono::duration_cast<std::chrono::seconds>(
|
||||||
@@ -380,10 +381,10 @@ void cmCTestRunTest::MemCheckPostProcess()
|
|||||||
if (!this->TestHandler->MemCheck) {
|
if (!this->TestHandler->MemCheck) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< ": process test output now: "
|
this->Index << ": process test output now: "
|
||||||
<< this->TestProperties->Name << " "
|
<< this->TestProperties->Name << " "
|
||||||
<< this->TestResult.Name << std::endl,
|
<< this->TestResult.Name << std::endl,
|
||||||
this->TestHandler->GetQuiet());
|
this->TestHandler->GetQuiet());
|
||||||
cmCTestMemCheckHandler* handler =
|
cmCTestMemCheckHandler* handler =
|
||||||
static_cast<cmCTestMemCheckHandler*>(this->TestHandler);
|
static_cast<cmCTestMemCheckHandler*>(this->TestHandler);
|
||||||
@@ -425,7 +426,8 @@ void cmCTestRunTest::StartFailure(std::string const& output)
|
|||||||
bool cmCTestRunTest::StartTest(size_t total)
|
bool cmCTestRunTest::StartTest(size_t total)
|
||||||
{
|
{
|
||||||
this->TotalNumberOfTests = total; // save for rerun case
|
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 "
|
<< "Start "
|
||||||
<< std::setw(getNumWidth(this->TestHandler->GetMaxIndex()))
|
<< std::setw(getNumWidth(this->TestHandler->GetMaxIndex()))
|
||||||
<< this->TestProperties->Index << ": "
|
<< this->TestProperties->Index << ": "
|
||||||
@@ -592,20 +594,21 @@ void cmCTestRunTest::ComputeArguments()
|
|||||||
this->TestResult.FullCommandLine = testCommand;
|
this->TestResult.FullCommandLine = testCommand;
|
||||||
|
|
||||||
// Print the test command in verbose mode
|
// 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->Index << ": "
|
||||||
<< (this->TestHandler->MemCheck ? "MemCheck" : "Test")
|
<< (this->TestHandler->MemCheck ? "MemCheck" : "Test")
|
||||||
<< " command: " << testCommand << std::endl);
|
<< " command: " << testCommand << std::endl);
|
||||||
|
|
||||||
// Print any test-specific env vars in verbose mode
|
// Print any test-specific env vars in verbose mode
|
||||||
if (!this->TestProperties->Environment.empty()) {
|
if (!this->TestProperties->Environment.empty()) {
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< ": "
|
this->Index << ": "
|
||||||
<< "Environment variables: " << std::endl);
|
<< "Environment variables: " << std::endl);
|
||||||
}
|
}
|
||||||
for (std::string const& env : this->TestProperties->Environment) {
|
for (std::string const& env : this->TestProperties->Environment) {
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": " << env
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< std::endl);
|
this->Index << ": " << env << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -658,10 +661,11 @@ bool cmCTestRunTest::ForkProcess(cmDuration testTimeOut, bool explicitTimeout,
|
|||||||
if (testTimeOut == cmDuration::zero() && explicitTimeout) {
|
if (testTimeOut == cmDuration::zero() && explicitTimeout) {
|
||||||
timeout = cmDuration::zero();
|
timeout = cmDuration::zero();
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< ": "
|
this->Index << ": "
|
||||||
<< "Test timeout computed to be: "
|
<< "Test timeout computed to be: "
|
||||||
<< cmDurationTo<unsigned int>(timeout) << "\n",
|
<< cmDurationTo<unsigned int>(timeout)
|
||||||
|
<< "\n",
|
||||||
this->TestHandler->GetQuiet());
|
this->TestHandler->GetQuiet());
|
||||||
|
|
||||||
this->TestProcess->SetTimeout(timeout);
|
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
|
// got for run until pass. Trick is when this is called we don't
|
||||||
// yet know if we are passing or failing.
|
// yet know if we are passing or failing.
|
||||||
if (this->NumberOfRunsLeft == 1) {
|
if (this->NumberOfRunsLeft == 1) {
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< completed << "/");
|
std::setw(getNumWidth(total)) << completed << "/");
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(getNumWidth(total))
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< total << " ");
|
std::setw(getNumWidth(total)) << total << " ");
|
||||||
}
|
}
|
||||||
// if this is one of several runs of a test just print blank space
|
// if this is one of several runs of a test just print blank space
|
||||||
// to keep things neat
|
// to keep things neat
|
||||||
else {
|
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) {
|
if (this->TestHandler->MemCheck) {
|
||||||
@@ -746,8 +750,8 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total)
|
|||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str());
|
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()
|
void cmCTestRunTest::FinalizeTest()
|
||||||
|
|||||||
@@ -107,9 +107,10 @@ bool cmCTestSVN::NoteOldRevision()
|
|||||||
svninfo.OldRevision = this->LoadInfo(svninfo);
|
svninfo.OldRevision = this->LoadInfo(svninfo);
|
||||||
this->Log << "Revision for repository '" << svninfo.LocalPath
|
this->Log << "Revision for repository '" << svninfo.LocalPath
|
||||||
<< "' before update: " << svninfo.OldRevision << "\n";
|
<< "' before update: " << svninfo.OldRevision << "\n";
|
||||||
cmCTestLog(
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, " Old revision of external repository '"
|
" Old revision of external repository '"
|
||||||
<< svninfo.LocalPath << "' is: " << svninfo.OldRevision << "\n");
|
<< svninfo.LocalPath << "' is: " << svninfo.OldRevision
|
||||||
|
<< "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the global old revision to the one of the root
|
// Set the global old revision to the one of the root
|
||||||
@@ -128,9 +129,10 @@ bool cmCTestSVN::NoteNewRevision()
|
|||||||
svninfo.NewRevision = this->LoadInfo(svninfo);
|
svninfo.NewRevision = this->LoadInfo(svninfo);
|
||||||
this->Log << "Revision for repository '" << svninfo.LocalPath
|
this->Log << "Revision for repository '" << svninfo.LocalPath
|
||||||
<< "' after update: " << svninfo.NewRevision << "\n";
|
<< "' after update: " << svninfo.NewRevision << "\n";
|
||||||
cmCTestLog(
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, " New revision of external repository '"
|
" New revision of external repository '"
|
||||||
<< svninfo.LocalPath << "' is: " << svninfo.NewRevision << "\n");
|
<< svninfo.LocalPath << "' is: " << svninfo.NewRevision
|
||||||
|
<< "\n");
|
||||||
|
|
||||||
// svninfo.Root = ""; // uncomment to test GuessBase
|
// svninfo.Root = ""; // uncomment to test GuessBase
|
||||||
this->Log << "Repository '" << svninfo.LocalPath
|
this->Log << "Repository '" << svninfo.LocalPath
|
||||||
@@ -290,8 +292,9 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
|
|||||||
return RunChild(&args[0], out, err);
|
return RunChild(&args[0], out, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
class cmCTestSVN::LogParser : public cmCTestVC::OutputLogger,
|
class cmCTestSVN::LogParser
|
||||||
private cmXMLParser
|
: public cmCTestVC::OutputLogger
|
||||||
|
, private cmXMLParser
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogParser(cmCTestSVN* svn, const char* prefix, SVNInfo& svninfo)
|
LogParser(cmCTestSVN* svn, const char* prefix, SVNInfo& svninfo)
|
||||||
@@ -302,6 +305,7 @@ public:
|
|||||||
this->InitializeParser();
|
this->InitializeParser();
|
||||||
}
|
}
|
||||||
~LogParser() override { this->CleanupParser(); }
|
~LogParser() override { this->CleanupParser(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cmCTestSVN* SVN;
|
cmCTestSVN* SVN;
|
||||||
cmCTestSVN::SVNInfo& SVNRepo;
|
cmCTestSVN::SVNInfo& SVNRepo;
|
||||||
|
|||||||
@@ -39,9 +39,9 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class cmExecutionStatus;
|
class cmExecutionStatus;
|
||||||
@@ -184,8 +184,9 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
|||||||
argv.push_back("-SR");
|
argv.push_back("-SR");
|
||||||
argv.push_back(total_script_arg.c_str());
|
argv.push_back(total_script_arg.c_str());
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Executable for CTest is: "
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< cmSystemTools::GetCTestCommand() << "\n");
|
"Executable for CTest is: " << cmSystemTools::GetCTestCommand()
|
||||||
|
<< "\n");
|
||||||
|
|
||||||
// now pass through all the other arguments
|
// now pass through all the other arguments
|
||||||
std::vector<std::string>& initArgs =
|
std::vector<std::string>& initArgs =
|
||||||
@@ -210,8 +211,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
|||||||
int pipe =
|
int pipe =
|
||||||
cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err);
|
cmSystemTools::WaitForLine(cp, line, std::chrono::seconds(100), out, err);
|
||||||
while (pipe != cmsysProcess_Pipe_None) {
|
while (pipe != cmsysProcess_Pipe_None) {
|
||||||
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: " << line
|
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< "\n");
|
"Output: " << line << "\n");
|
||||||
if (pipe == cmsysProcess_Pipe_STDERR) {
|
if (pipe == cmsysProcess_Pipe_STDERR) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, line << "\n");
|
cmCTestLog(this->CTest, ERROR_MESSAGE, line << "\n");
|
||||||
} else if (pipe == cmsysProcess_Pipe_STDOUT) {
|
} else if (pipe == cmsysProcess_Pipe_STDOUT) {
|
||||||
@@ -230,17 +231,19 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
|||||||
retVal = cmsysProcess_GetExitValue(cp);
|
retVal = cmsysProcess_GetExitValue(cp);
|
||||||
} else if (result == cmsysProcess_State_Exception) {
|
} else if (result == cmsysProcess_State_Exception) {
|
||||||
retVal = cmsysProcess_GetExitException(cp);
|
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
|
<< cmsysProcess_GetExceptionString(cp) << " " << retVal
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
failed = true;
|
failed = true;
|
||||||
} else if (result == cmsysProcess_State_Expired) {
|
} else if (result == cmsysProcess_State_Expired) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"\tThere was a timeout" << std::endl);
|
||||||
failed = true;
|
failed = true;
|
||||||
} else if (result == cmsysProcess_State_Error) {
|
} else if (result == cmsysProcess_State_Error) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing ctest: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
"\tError executing ctest: " << cmsysProcess_GetErrorString(cp)
|
||||||
|
<< std::endl);
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
@@ -253,8 +256,8 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
|
|||||||
message << arg << " ";
|
message << arg << " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, message.str() << argv[0]
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
message.str() << argv[0] << std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
@@ -372,8 +375,8 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
|
|||||||
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
|
this->Makefile->GetModulesFile("CTestScriptMode.cmake");
|
||||||
if (!this->Makefile->ReadListFile(systemFile.c_str()) ||
|
if (!this->Makefile->ReadListFile(systemFile.c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag()) {
|
cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in read:" << systemFile
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< "\n");
|
"Error in read:" << systemFile << "\n");
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,14 +98,16 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
this->Quiet);
|
this->Quiet);
|
||||||
|
|
||||||
if (smodel) {
|
if (smodel) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"Run dashboard with model "
|
||||||
<< smodel << std::endl
|
<< smodel << std::endl
|
||||||
<< " Source directory: " << src_dir << std::endl
|
<< " Source directory: " << src_dir << std::endl
|
||||||
<< " Build directory: " << bld_dir << std::endl,
|
<< " Build directory: " << bld_dir << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
} else {
|
} else {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
"to-be-determined model"
|
"Run dashboard with "
|
||||||
|
"to-be-determined model"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Source directory: " << src_dir << std::endl
|
<< " Source directory: " << src_dir << std::endl
|
||||||
<< " Build directory: " << bld_dir << std::endl,
|
<< " Build directory: " << bld_dir << std::endl,
|
||||||
|
|||||||
@@ -28,9 +28,9 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#if defined(CTEST_USE_XMLRPC)
|
#if defined(CTEST_USE_XMLRPC)
|
||||||
#include "cmVersion.h"
|
# include "cmVersion.h"
|
||||||
#include "cm_sys_stat.h"
|
# include "cm_sys_stat.h"
|
||||||
#include "cm_xmlrpc.h"
|
# include "cm_xmlrpc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
|
#define SUBMIT_TIMEOUT_IN_SECONDS_DEFAULT 120
|
||||||
@@ -248,14 +248,16 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
res = ::curl_easy_perform(curl);
|
res = ::curl_easy_perform(curl);
|
||||||
|
|
||||||
if (!chunk.empty()) {
|
if (!chunk.empty()) {
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||||
<< "]" << std::endl,
|
<< "]" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
if (!chunkDebug.empty()) {
|
if (!chunkDebug.empty()) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this->CTest, DEBUG, "CURL debug output: ["
|
this->CTest, DEBUG,
|
||||||
|
"CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -263,8 +265,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
|
|
||||||
fclose(ftpfile);
|
fclose(ftpfile);
|
||||||
if (res) {
|
if (res) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< local_file << std::endl);
|
" Error when uploading file: " << local_file
|
||||||
|
<< std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
" Error message was: " << error_buffer << std::endl);
|
" Error message was: " << error_buffer << std::endl);
|
||||||
*this->LogFile << " Error when uploading file: " << local_file
|
*this->LogFile << " Error when uploading file: " << local_file
|
||||||
@@ -274,7 +277,8 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
|||||||
// avoid dereference of empty vector
|
// avoid dereference of empty vector
|
||||||
if (!chunk.empty()) {
|
if (!chunk.empty()) {
|
||||||
*this->LogFile << cmCTestLogWrite(&*chunk.begin(), chunk.size());
|
*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()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@@ -418,8 +422,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string upload_as = url +
|
std::string upload_as = url +
|
||||||
((url.find('?') == std::string::npos) ? '?' : '&') + "FileName=" +
|
((url.find('?') == std::string::npos) ? '?' : '&') +
|
||||||
ofile;
|
"FileName=" + ofile;
|
||||||
|
|
||||||
upload_as += "&MD5=";
|
upload_as += "&MD5=";
|
||||||
|
|
||||||
@@ -475,7 +479,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
res = ::curl_easy_perform(curl);
|
res = ::curl_easy_perform(curl);
|
||||||
|
|
||||||
if (!chunk.empty()) {
|
if (!chunk.empty()) {
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||||
<< "]" << std::endl,
|
<< "]" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -483,7 +488,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
}
|
}
|
||||||
if (!chunkDebug.empty()) {
|
if (!chunkDebug.empty()) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this->CTest, DEBUG, "CURL debug output: ["
|
this->CTest, DEBUG,
|
||||||
|
"CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -537,7 +543,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
if (!chunk.empty()) {
|
if (!chunk.empty()) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this->CTest, DEBUG, "CURL output: ["
|
this->CTest, DEBUG,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -552,8 +559,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
|
|
||||||
fclose(ftpfile);
|
fclose(ftpfile);
|
||||||
if (res) {
|
if (res) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when uploading file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< local_file << std::endl);
|
" Error when uploading file: " << local_file
|
||||||
|
<< std::endl);
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
" Error message was: " << error_buffer << std::endl);
|
" Error message was: " << error_buffer << std::endl);
|
||||||
*this->LogFile << " Error when uploading file: " << local_file
|
*this->LogFile << " Error when uploading file: " << local_file
|
||||||
@@ -565,7 +573,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
|||||||
*this->LogFile << " Curl output was: "
|
*this->LogFile << " Curl output was: "
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@@ -612,7 +621,8 @@ void cmCTestSubmitHandler::ParseResponse(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->HasWarnings || this->HasErrors) {
|
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");
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -689,8 +699,8 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string turl = url +
|
std::string turl = url +
|
||||||
((url.find('?') == std::string::npos) ? '?' : '&') + "xmlfile=" +
|
((url.find('?') == std::string::npos) ? '?' : '&') +
|
||||||
ofile;
|
"xmlfile=" + ofile;
|
||||||
*this->LogFile << "Trigger url: " << turl << std::endl;
|
*this->LogFile << "Trigger url: " << turl << std::endl;
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
" Trigger url: " << turl << std::endl, this->Quiet);
|
" 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: "
|
*this->LogFile << " Curl output was: "
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: ["
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
}
|
}
|
||||||
@@ -719,14 +730,16 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!chunk.empty()) {
|
if (!chunk.empty()) {
|
||||||
cmCTestOptionalLog(this->CTest, DEBUG, "CURL output: ["
|
cmCTestOptionalLog(this->CTest, DEBUG,
|
||||||
|
"CURL output: ["
|
||||||
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
<< cmCTestLogWrite(&*chunk.begin(), chunk.size())
|
||||||
<< "]" << std::endl,
|
<< "]" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
if (!chunkDebug.empty()) {
|
if (!chunkDebug.empty()) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this->CTest, DEBUG, "CURL debug output: ["
|
this->CTest, DEBUG,
|
||||||
|
"CURL debug output: ["
|
||||||
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
<< cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -777,9 +790,9 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
|||||||
argv[1] = lfname.c_str();
|
argv[1] = lfname.c_str();
|
||||||
std::string rfname = url + "/" + remoteprefix + file;
|
std::string rfname = url + "/" + remoteprefix + file;
|
||||||
argv[2] = rfname.c_str();
|
argv[2] = rfname.c_str();
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Execute \""
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< argv[0] << "\" \"" << argv[1] << "\" \"" << argv[2]
|
"Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||||
<< "\"" << std::endl,
|
<< argv[2] << "\"" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
*this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \""
|
||||||
<< argv[2] << "\"" << std::endl;
|
<< 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;
|
*this->LogFile << "\tThere was an exception: " << retVal << std::endl;
|
||||||
problems++;
|
problems++;
|
||||||
} else if (result == cmsysProcess_State_Expired) {
|
} else if (result == cmsysProcess_State_Expired) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"\tThere was a timeout" << std::endl);
|
||||||
*this->LogFile << "\tThere was a timeout" << std::endl;
|
*this->LogFile << "\tThere was a timeout" << std::endl;
|
||||||
problems++;
|
problems++;
|
||||||
} else if (result == cmsysProcess_State_Error) {
|
} else if (result == cmsysProcess_State_Error) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing SCP: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
"\tError executing SCP: " << cmsysProcess_GetErrorString(cp)
|
||||||
|
<< std::endl);
|
||||||
*this->LogFile << "\tError executing SCP: "
|
*this->LogFile << "\tError executing SCP: "
|
||||||
<< cmsysProcess_GetErrorString(cp) << std::endl;
|
<< cmsysProcess_GetErrorString(cp) << std::endl;
|
||||||
problems++;
|
problems++;
|
||||||
@@ -864,8 +878,9 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
|
|||||||
lfname += "/" + file;
|
lfname += "/" + file;
|
||||||
std::string rfname = destination + "/" + remoteprefix + file;
|
std::string rfname = destination + "/" + remoteprefix + file;
|
||||||
cmSystemTools::CopyFileAlways(lfname, rfname);
|
cmSystemTools::CopyFileAlways(lfname, rfname);
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Copy file: "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< lfname << " to " << rfname << std::endl,
|
" Copy file: " << lfname << " to " << rfname
|
||||||
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
std::string tagDoneFile = destination + "/" + remoteprefix + "DONE";
|
||||||
@@ -892,8 +907,9 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
|||||||
xmlrpc_env_init(&env);
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
/* Call the famous server at UserLand. */
|
/* Call the famous server at UserLand. */
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Submitting to: "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< realURL << " (" << remoteprefix << ")" << std::endl,
|
" Submitting to: " << realURL << " (" << remoteprefix
|
||||||
|
<< ")" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
for (std::string const& file : files) {
|
for (std::string const& file : files) {
|
||||||
xmlrpc_value* result;
|
xmlrpc_value* result;
|
||||||
@@ -916,8 +932,8 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
|||||||
// make sure the file is not too big.
|
// make sure the file is not too big.
|
||||||
if (static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
|
if (static_cast<off_t>(static_cast<size_t>(st.st_size)) !=
|
||||||
static_cast<off_t>(st.st_size)) {
|
static_cast<off_t>(st.st_size)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " << local_file
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
" File too big: " << local_file << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
size_t fileSize = static_cast<size_t>(st.st_size);
|
size_t fileSize = static_cast<size_t>(st.st_size);
|
||||||
@@ -947,9 +963,10 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
|||||||
delete[] fileBuffer;
|
delete[] fileBuffer;
|
||||||
|
|
||||||
if (env.fault_occurred) {
|
if (env.fault_occurred) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Submission problem: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< env.fault_string << " (" << env.fault_code << ")"
|
" Submission problem: " << env.fault_string << " ("
|
||||||
<< std::endl);
|
<< env.fault_code << ")"
|
||||||
|
<< std::endl);
|
||||||
xmlrpc_env_clean(&env);
|
xmlrpc_env_clean(&env);
|
||||||
xmlrpc_client_cleanup();
|
xmlrpc_client_cleanup();
|
||||||
return false;
|
return false;
|
||||||
@@ -1004,8 +1021,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!cmSystemTools::FileExists(file)) {
|
if (!cmSystemTools::FileExists(file)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Upload file not found: '"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< file << "'\n");
|
"Upload file not found: '" << file << "'\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
cmCTestCurl curl(this->CTest);
|
cmCTestCurl curl(this->CTest);
|
||||||
@@ -1040,8 +1057,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
unsigned long retryDelayValue = 0;
|
unsigned long retryDelayValue = 0;
|
||||||
if (!cmSystemTools::StringToULong(retryDelayString.c_str(),
|
if (!cmSystemTools::StringToULong(retryDelayString.c_str(),
|
||||||
&retryDelayValue)) {
|
&retryDelayValue)) {
|
||||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
|
cmCTestLog(this->CTest, WARNING,
|
||||||
<< retryDelayString << std::endl);
|
"Invalid value for 'RETRY_DELAY' : " << retryDelayString
|
||||||
|
<< std::endl);
|
||||||
} else {
|
} else {
|
||||||
retryDelay = std::chrono::seconds(retryDelayValue);
|
retryDelay = std::chrono::seconds(retryDelayValue);
|
||||||
}
|
}
|
||||||
@@ -1049,8 +1067,9 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
unsigned long retryCount = 0;
|
unsigned long retryCount = 0;
|
||||||
if (!retryCountString.empty()) {
|
if (!retryCountString.empty()) {
|
||||||
if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) {
|
if (!cmSystemTools::StringToULong(retryCountString.c_str(), &retryCount)) {
|
||||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'RETRY_DELAY' : "
|
cmCTestLog(this->CTest, WARNING,
|
||||||
<< retryCountString << std::endl);
|
"Invalid value for 'RETRY_DELAY' : " << retryCountString
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1118,7 +1137,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!internalTest && !requestSucceeded) {
|
if (!internalTest && !requestSucceeded) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error in HttpRequest\n"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Error in HttpRequest\n"
|
||||||
<< response);
|
<< response);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -1128,7 +1148,8 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
Json::Value json;
|
Json::Value json;
|
||||||
Json::Reader reader;
|
Json::Reader reader;
|
||||||
if (!internalTest && !reader.parse(response, json)) {
|
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"
|
<< response << "]\n"
|
||||||
<< reader.getFormattedErrorMessages() << "\n");
|
<< reader.getFormattedErrorMessages() << "\n");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1195,12 +1216,14 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!uploadSucceeded) {
|
if (!uploadSucceeded) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "error uploading to CDash. "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< file << " " << url << " " << fstr.str());
|
"error uploading to CDash. " << file << " " << url << " "
|
||||||
|
<< fstr.str());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!reader.parse(response, json)) {
|
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"
|
<< response << "]\n"
|
||||||
<< reader.getFormattedErrorMessages() << "\n");
|
<< reader.getFormattedErrorMessages() << "\n");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1357,7 +1380,8 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "Submit files (using "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"Submit files (using "
|
||||||
<< this->CTest->GetCTestConfiguration("DropMethod")
|
<< this->CTest->GetCTestConfiguration("DropMethod")
|
||||||
<< ")" << std::endl,
|
<< ")" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -1380,8 +1404,9 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
std::string url = "ftp://";
|
std::string url = "ftp://";
|
||||||
url += cmCTest::MakeURLSafe(
|
url += cmCTest::MakeURLSafe(
|
||||||
this->CTest->GetCTestConfiguration("DropSiteUser")) +
|
this->CTest->GetCTestConfiguration("DropSiteUser")) +
|
||||||
":" + cmCTest::MakeURLSafe(
|
":" +
|
||||||
this->CTest->GetCTestConfiguration("DropSitePassword")) +
|
cmCTest::MakeURLSafe(
|
||||||
|
this->CTest->GetCTestConfiguration("DropSitePassword")) +
|
||||||
"@" + this->CTest->GetCTestConfiguration("DropSite") +
|
"@" + this->CTest->GetCTestConfiguration("DropSite") +
|
||||||
cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration("DropLocation"));
|
cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration("DropLocation"));
|
||||||
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
|
if (!this->CTest->GetCTestConfiguration("DropSiteUser").empty()) {
|
||||||
@@ -1409,12 +1434,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!this->CDash) {
|
if (!this->CDash) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
" Using HTTP trigger method"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Trigger site: "
|
<< " Trigger site: "
|
||||||
<< this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
|
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||||
this->Quiet);
|
<< std::endl,
|
||||||
|
this->Quiet);
|
||||||
if (!this->TriggerUsingHTTP(
|
if (!this->TriggerUsingHTTP(
|
||||||
files, prefix,
|
files, prefix,
|
||||||
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
||||||
@@ -1466,12 +1492,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!this->CDash) {
|
if (!this->CDash) {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method"
|
" Using HTTP trigger method"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " Trigger site: "
|
<< " Trigger site: "
|
||||||
<< this->CTest->GetCTestConfiguration("TriggerSite") << std::endl,
|
<< this->CTest->GetCTestConfiguration("TriggerSite")
|
||||||
this->Quiet);
|
<< std::endl,
|
||||||
|
this->Quiet);
|
||||||
if (!this->TriggerUsingHTTP(
|
if (!this->TriggerUsingHTTP(
|
||||||
files, prefix,
|
files, prefix,
|
||||||
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
this->CTest->GetCTestConfiguration("TriggerSite"))) {
|
||||||
@@ -1482,15 +1509,17 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this->HasErrors) {
|
if (this->HasErrors) {
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Errors occurred during "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
"submission."
|
" Errors occurred during "
|
||||||
|
"submission."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
ofs << " Errors occurred during submission. " << std::endl;
|
ofs << " Errors occurred during submission. " << std::endl;
|
||||||
} else {
|
} else {
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, " Submission successful"
|
" Submission successful"
|
||||||
<< (this->HasWarnings ? ", with warnings." : "") << std::endl,
|
<< (this->HasWarnings ? ", with warnings." : "")
|
||||||
this->Quiet);
|
<< std::endl,
|
||||||
|
this->Quiet);
|
||||||
ofs << " Submission successful"
|
ofs << " Submission successful"
|
||||||
<< (this->HasWarnings ? ", with warnings." : "") << std::endl;
|
<< (this->HasWarnings ? ", with warnings." : "") << std::endl;
|
||||||
}
|
}
|
||||||
@@ -1587,8 +1616,9 @@ int cmCTestSubmitHandler::ProcessHandler()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, " Unknown submission method: \""
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< dropMethod << "\"" << std::endl);
|
" Unknown submission method: \"" << dropMethod << "\""
|
||||||
|
<< std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,14 +112,16 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler()
|
|||||||
if (!cmSystemTools::StringToULong(this->Values[ctt_TEST_LOAD],
|
if (!cmSystemTools::StringToULong(this->Values[ctt_TEST_LOAD],
|
||||||
&testLoad)) {
|
&testLoad)) {
|
||||||
testLoad = 0;
|
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);
|
<< this->Values[ctt_TEST_LOAD] << std::endl);
|
||||||
}
|
}
|
||||||
} else if (ctestTestLoad && *ctestTestLoad) {
|
} else if (ctestTestLoad && *ctestTestLoad) {
|
||||||
if (!cmSystemTools::StringToULong(ctestTestLoad, &testLoad)) {
|
if (!cmSystemTools::StringToULong(ctestTestLoad, &testLoad)) {
|
||||||
testLoad = 0;
|
testLoad = 0;
|
||||||
cmCTestLog(this->CTest, WARNING, "Invalid value for 'CTEST_TEST_LOAD' : "
|
cmCTestLog(this->CTest, WARNING,
|
||||||
<< ctestTestLoad << std::endl);
|
"Invalid value for 'CTEST_TEST_LOAD' : " << ctestTestLoad
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
testLoad = this->CTest->GetTestLoad();
|
testLoad = this->CTest->GetTestLoad();
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* This is called when the command is first encountered in
|
* This is called when the command is first encountered in
|
||||||
* the CMakeLists.txt file.
|
* the CMakeLists.txt file.
|
||||||
*/
|
*/
|
||||||
bool InitialPass(std::vector<std::string> const& /*unused*/,
|
bool InitialPass(std::vector<std::string> const& /*unused*/,
|
||||||
cmExecutionStatus& /*unused*/) override;
|
cmExecutionStatus& /*unused*/) override;
|
||||||
|
|
||||||
@@ -472,11 +472,12 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
|
|
||||||
this->TestResults.clear();
|
this->TestResults.clear();
|
||||||
|
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->CTest, HANDLER_OUTPUT, (this->MemCheck ? "Memory check" : "Test")
|
(this->MemCheck ? "Memory check" : "Test")
|
||||||
<< " project " << cmSystemTools::GetCurrentWorkingDirectory()
|
<< " project "
|
||||||
<< std::endl,
|
<< cmSystemTools::GetCurrentWorkingDirectory()
|
||||||
this->Quiet);
|
<< std::endl,
|
||||||
|
this->Quiet);
|
||||||
if (!this->PreProcessHandler()) {
|
if (!this->PreProcessHandler()) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -500,13 +501,14 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
|
|
||||||
if (total == 0) {
|
if (total == 0) {
|
||||||
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"No tests were found!!!" << std::endl);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this->HandlerVerbose && !passed.empty() &&
|
if (this->HandlerVerbose && !passed.empty() &&
|
||||||
(this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag)) {
|
(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,
|
<< "The following tests passed:" << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
for (std::string const& j : passed) {
|
for (std::string const& j : passed) {
|
||||||
@@ -533,7 +535,8 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
percent = 99;
|
percent = 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
std::endl
|
||||||
<< static_cast<int>(percent + .5f) << "% tests passed, "
|
<< static_cast<int>(percent + .5f) << "% tests passed, "
|
||||||
<< failed.size() << " tests failed out of " << total
|
<< failed.size() << " tests failed out of " << total
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -553,7 +556,8 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
|
|
||||||
if (!disabledTests.empty()) {
|
if (!disabledTests.empty()) {
|
||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
std::endl
|
||||||
<< "The following tests did not run:" << std::endl);
|
<< "The following tests did not run:" << std::endl);
|
||||||
this->StartLogFile("TestsDisabled", ofs);
|
this->StartLogFile("TestsDisabled", ofs);
|
||||||
|
|
||||||
@@ -565,15 +569,16 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
} else {
|
} else {
|
||||||
disabled_reason = "Skipped";
|
disabled_reason = "Skipped";
|
||||||
}
|
}
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::setw(3) << dt.TestCount << " - " << dt.Name
|
"\t" << std::setw(3) << dt.TestCount << " - " << dt.Name
|
||||||
<< " (" << disabled_reason << ")" << std::endl);
|
<< " (" << disabled_reason << ")" << std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!failed.empty()) {
|
if (!failed.empty()) {
|
||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
std::endl
|
||||||
<< "The following tests FAILED:" << std::endl);
|
<< "The following tests FAILED:" << std::endl);
|
||||||
this->StartLogFile("TestsFailed", ofs);
|
this->StartLogFile("TestsFailed", ofs);
|
||||||
|
|
||||||
@@ -582,9 +587,10 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
!cmHasLiteralPrefix(ft.CompletionStatus, "SKIP_RETURN_CODE=") &&
|
!cmHasLiteralPrefix(ft.CompletionStatus, "SKIP_RETURN_CODE=") &&
|
||||||
ft.CompletionStatus != "Disabled") {
|
ft.CompletionStatus != "Disabled") {
|
||||||
ofs << ft.TestCount << ":" << ft.Name << std::endl;
|
ofs << ft.TestCount << ":" << ft.Name << std::endl;
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t"
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< std::setw(3) << ft.TestCount << " - " << ft.Name
|
"\t" << std::setw(3) << ft.TestCount << " - " << ft.Name
|
||||||
<< " (" << this->GetTestStatus(ft) << ")" << std::endl);
|
<< " (" << this->GetTestStatus(ft) << ")"
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -595,7 +601,8 @@ int cmCTestTestHandler::ProcessHandler()
|
|||||||
if (!this->StartResultingXML(
|
if (!this->StartResultingXML(
|
||||||
(this->MemCheck ? cmCTest::PartMemCheck : cmCTest::PartTest),
|
(this->MemCheck ? cmCTest::PartMemCheck : cmCTest::PartTest),
|
||||||
(this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile)) {
|
(this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Cannot create "
|
||||||
<< (this->MemCheck ? "memory check" : "testing")
|
<< (this->MemCheck ? "memory check" : "testing")
|
||||||
<< " XML file" << std::endl);
|
<< " XML file" << std::endl);
|
||||||
this->LogFile = nullptr;
|
this->LogFile = nullptr;
|
||||||
@@ -671,8 +678,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
|||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
"\nSubproject Time Summary:", this->Quiet);
|
"\nSubproject Time Summary:", this->Quiet);
|
||||||
} else {
|
} else {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\nLabel Time Summary:",
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
this->Quiet);
|
"\nLabel Time Summary:", this->Quiet);
|
||||||
}
|
}
|
||||||
for (std::string const& i : labels) {
|
for (std::string const& i : labels) {
|
||||||
std::string label = i;
|
std::string label = i;
|
||||||
@@ -687,7 +694,8 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool doSubProject)
|
|||||||
labelCountStr << "s";
|
labelCountStr << "s";
|
||||||
}
|
}
|
||||||
labelCountStr << ")";
|
labelCountStr << ")";
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "\n"
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
"\n"
|
||||||
<< label << " = " << buf << " "
|
<< label << " = " << buf << " "
|
||||||
<< labelCountStr.str(),
|
<< labelCountStr.str(),
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
@@ -1089,9 +1097,10 @@ void cmCTestTestHandler::UpdateForFixtures(ListOfTests& tests) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Added "
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< fixtureTestsAdded
|
"Added " << fixtureTestsAdded
|
||||||
<< " tests to meet fixture requirements" << std::endl,
|
<< " tests to meet fixture requirements"
|
||||||
|
<< std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1119,8 +1128,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, int& value,
|
|||||||
fin >> value;
|
fin >> value;
|
||||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< tag << " found [" << line << "]" << std::endl);
|
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1136,8 +1146,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, double& value,
|
|||||||
fin >> value;
|
fin >> value;
|
||||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< tag << " found [" << line << "]" << std::endl);
|
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1162,8 +1173,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, bool& value,
|
|||||||
#endif
|
#endif
|
||||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< tag << " found [" << line << "]" << std::endl);
|
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1179,8 +1191,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, size_t& value,
|
|||||||
fin >> value;
|
fin >> value;
|
||||||
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
ret = cmSystemTools::GetLineFromStream(fin, line); // read blank line
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< tag << " found [" << line << "]" << std::endl);
|
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1195,8 +1208,9 @@ bool cmCTestTestHandler::GetValue(const char* tag, std::string& value,
|
|||||||
if (line == tag) {
|
if (line == tag) {
|
||||||
ret = cmSystemTools::GetLineFromStream(fin, value);
|
ret = cmSystemTools::GetLineFromStream(fin, value);
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "parse error: missing tag: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< tag << " found [" << line << "]" << std::endl);
|
"parse error: missing tag: " << tag << " found [" << line << "]"
|
||||||
|
<< std::endl);
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -1611,7 +1625,8 @@ std::string cmCTestTestHandler::FindExecutable(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fullPath.empty()) {
|
if (fullPath.empty()) {
|
||||||
cmCTestLog(ctest, HANDLER_OUTPUT, "Could not find executable "
|
cmCTestLog(ctest, HANDLER_OUTPUT,
|
||||||
|
"Could not find executable "
|
||||||
<< testCommand << "\n"
|
<< testCommand << "\n"
|
||||||
<< "Looked in the following places:\n");
|
<< "Looked in the following places:\n");
|
||||||
for (std::string const& f : failed) {
|
for (std::string const& f : failed) {
|
||||||
@@ -1793,8 +1808,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
|||||||
|
|
||||||
cmsys::Directory directory;
|
cmsys::Directory directory;
|
||||||
if (directory.Load(dirName) == 0) {
|
if (directory.Load(dirName) == 0) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to read the contents of "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< dirName << std::endl);
|
"Unable to read the contents of " << dirName << std::endl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1829,8 +1844,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
|||||||
|
|
||||||
if (!cmSystemTools::FileExists(lastTestsFailedLog)) {
|
if (!cmSystemTools::FileExists(lastTestsFailedLog)) {
|
||||||
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
if (!this->CTest->GetShowOnly() && !this->CTest->ShouldPrintLabels()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, lastTestsFailedLog
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< " does not exist!" << std::endl);
|
lastTestsFailedLog << " does not exist!" << std::endl);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1852,7 +1867,8 @@ void cmCTestTestHandler::ExpandTestsToRunInformationForRerunFailed()
|
|||||||
ifs.close();
|
ifs.close();
|
||||||
} else if (!this->CTest->GetShowOnly() &&
|
} else if (!this->CTest->GetShowOnly() &&
|
||||||
!this->CTest->ShouldPrintLabels()) {
|
!this->CTest->ShouldPrintLabels()) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem reading file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Problem reading file: "
|
||||||
<< lastTestsFailedLog
|
<< lastTestsFailedLog
|
||||||
<< " while generating list of previously failed tests."
|
<< " while generating list of previously failed tests."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
@@ -1961,11 +1977,12 @@ void cmCTestTestHandler::GenerateRegressionImages(cmXMLWriter& xml,
|
|||||||
xml.Element("Value", "Image " + filename + " is empty");
|
xml.Element("Value", "Image " + filename + " is empty");
|
||||||
xml.EndElement();
|
xml.EndElement();
|
||||||
} else {
|
} else {
|
||||||
cmsys::ifstream ifs(filename.c_str(), std::ios::in
|
cmsys::ifstream ifs(filename.c_str(),
|
||||||
|
std::ios::in
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
| std::ios::binary
|
| std::ios::binary
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
unsigned char* file_buffer = new unsigned char[len + 1];
|
unsigned char* file_buffer = new unsigned char[len + 1];
|
||||||
ifs.read(reinterpret_cast<char*>(file_buffer), len);
|
ifs.read(reinterpret_cast<char*>(file_buffer), len);
|
||||||
unsigned char* encoded_buffer = new unsigned char[static_cast<int>(
|
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.Attribute("text", "text/string");
|
||||||
xml.Element("Value", "File " + filename + " not found");
|
xml.Element("Value", "File " + filename + " not found");
|
||||||
xml.EndElement();
|
xml.EndElement();
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "File \""
|
cmCTestOptionalLog(
|
||||||
<< filename << "\" not found." << std::endl,
|
this->CTest, HANDLER_OUTPUT,
|
||||||
this->Quiet);
|
"File \"" << filename << "\" not found." << std::endl, this->Quiet);
|
||||||
}
|
}
|
||||||
cxml.erase(measurementfile.start(),
|
cxml.erase(measurementfile.start(),
|
||||||
measurementfile.end() - measurementfile.start());
|
measurementfile.end() - measurementfile.start());
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ void cmCTestUpdateHandler::Initialize()
|
|||||||
|
|
||||||
int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type)
|
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,
|
<< cmd << " and type: " << type << std::endl,
|
||||||
this->Quiet);
|
this->Quiet);
|
||||||
if (type && *type) {
|
if (type && *type) {
|
||||||
@@ -130,7 +131,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Use "
|
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
|
||||||
|
" Use "
|
||||||
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
|
<< cmCTestUpdateHandlerUpdateToString(this->UpdateType)
|
||||||
<< " repository type" << std::endl;
|
<< " repository type" << std::endl;
|
||||||
, this->Quiet);
|
, this->Quiet);
|
||||||
@@ -171,8 +173,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
//
|
//
|
||||||
cmGeneratedFileStream os;
|
cmGeneratedFileStream os;
|
||||||
if (!this->StartResultingXML(cmCTest::PartUpdate, "Update", os)) {
|
if (!this->StartResultingXML(cmCTest::PartUpdate, "Update", os)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot open log file" << std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
std::string start_time = this->CTest->CurrentTime();
|
std::string start_time = this->CTest->CurrentTime();
|
||||||
@@ -191,7 +193,8 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
std::string("ctest-") + cmVersion::GetCMakeVersion());
|
std::string("ctest-") + cmVersion::GetCMakeVersion());
|
||||||
xml.Element("Site", this->CTest->GetCTestConfiguration("Site"));
|
xml.Element("Site", this->CTest->GetCTestConfiguration("Site"));
|
||||||
xml.Element("BuildName", buildname);
|
xml.Element("BuildName", buildname);
|
||||||
xml.Element("BuildStamp", this->CTest->GetCurrentTag() + "-" +
|
xml.Element("BuildStamp",
|
||||||
|
this->CTest->GetCurrentTag() + "-" +
|
||||||
this->CTest->GetTestModelString());
|
this->CTest->GetTestModelString());
|
||||||
xml.Element("StartDateTime", start_time);
|
xml.Element("StartDateTime", start_time);
|
||||||
xml.Element("StartTime", start_time_time);
|
xml.Element("StartTime", start_time_time);
|
||||||
@@ -209,9 +212,9 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
this->Quiet);
|
this->Quiet);
|
||||||
}
|
}
|
||||||
if (int numModified = vc->GetPathCount(cmCTestVC::PathModified)) {
|
if (int numModified = vc->GetPathCount(cmCTestVC::PathModified)) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, " Found "
|
cmCTestOptionalLog(
|
||||||
<< numModified << " locally modified files\n",
|
this->CTest, HANDLER_OUTPUT,
|
||||||
this->Quiet);
|
" Found " << numModified << " locally modified files\n", this->Quiet);
|
||||||
localModifications += numModified;
|
localModifications += numModified;
|
||||||
}
|
}
|
||||||
if (int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting)) {
|
if (int numConflicting = vc->GetPathCount(cmCTestVC::PathConflicting)) {
|
||||||
@@ -241,8 +244,9 @@ int cmCTestUpdateHandler::ProcessHandler()
|
|||||||
if (!updated) {
|
if (!updated) {
|
||||||
xml.Content("Update command failed:\n");
|
xml.Content("Update command failed:\n");
|
||||||
xml.Content(vc->GetUpdateCommandLine());
|
xml.Content(vc->GetUpdateCommandLine());
|
||||||
cmCTestLog(this->CTest, HANDLER_OUTPUT, " Update command failed: "
|
cmCTestLog(this->CTest, HANDLER_OUTPUT,
|
||||||
<< vc->GetUpdateCommandLine() << "\n");
|
" Update command failed: " << vc->GetUpdateCommandLine()
|
||||||
|
<< "\n");
|
||||||
}
|
}
|
||||||
xml.EndElement(); // UpdateReturnStatus
|
xml.EndElement(); // UpdateReturnStatus
|
||||||
xml.EndElement(); // Update
|
xml.EndElement(); // Update
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ int cmCTestUploadHandler::ProcessHandler()
|
|||||||
cmGeneratedFileStream ofs;
|
cmGeneratedFileStream ofs;
|
||||||
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), "Upload.xml",
|
if (!this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), "Upload.xml",
|
||||||
ofs)) {
|
ofs)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open Upload.xml file"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot open Upload.xml file" << std::endl);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
std::string buildname =
|
std::string buildname =
|
||||||
@@ -45,7 +45,8 @@ int cmCTestUploadHandler::ProcessHandler()
|
|||||||
"<file:///Dart/Source/Server/XSL/Build.xsl> \"");
|
"<file:///Dart/Source/Server/XSL/Build.xsl> \"");
|
||||||
xml.StartElement("Site");
|
xml.StartElement("Site");
|
||||||
xml.Attribute("BuildName", buildname);
|
xml.Attribute("BuildName", buildname);
|
||||||
xml.Attribute("BuildStamp", this->CTest->GetCurrentTag() + "-" +
|
xml.Attribute("BuildStamp",
|
||||||
|
this->CTest->GetCurrentTag() + "-" +
|
||||||
this->CTest->GetTestModelString());
|
this->CTest->GetTestModelString());
|
||||||
xml.Attribute("Name", this->CTest->GetCTestConfiguration("Site"));
|
xml.Attribute("Name", this->CTest->GetCTestConfiguration("Site"));
|
||||||
xml.Attribute("Generator",
|
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());
|
bool result = this->RunChild(&vc_co[0], &out, &err, parent.c_str());
|
||||||
this->Log << "--- End Initial Checkout ---\n";
|
this->Log << "--- End Initial Checkout ---\n";
|
||||||
if (!result) {
|
if (!result) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Initial checkout failed!"
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Initial checkout failed!" << std::endl);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,10 +100,11 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
|||||||
std::string line;
|
std::string line;
|
||||||
std::vector<std::string> separateLine;
|
std::vector<std::string> separateLine;
|
||||||
if (!cmSystemTools::GetLineFromStream(in, line)) {
|
if (!cmSystemTools::GetLineFromStream(in, line)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Empty file : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< file << " referenced in this line of cmcov data:\n"
|
"Empty file : " << file
|
||||||
"["
|
<< " referenced in this line of cmcov data:\n"
|
||||||
<< line << "]\n");
|
"["
|
||||||
|
<< line << "]\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
separateLine.clear();
|
separateLine.clear();
|
||||||
@@ -112,8 +113,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
|||||||
separateLine[1] != "Line" || separateLine[2] != "RtnLine" ||
|
separateLine[1] != "Line" || separateLine[2] != "RtnLine" ||
|
||||||
separateLine[3] != "Code") {
|
separateLine[3] != "Code") {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
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");
|
<< line << "]\n");
|
||||||
}
|
}
|
||||||
std::string routine;
|
std::string routine;
|
||||||
@@ -128,8 +130,9 @@ bool cmParseCacheCoverage::ReadCMCovFile(const char* file)
|
|||||||
if (separateLine.size() < 4) {
|
if (separateLine.size() < 4) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
"Bad line of cmcov file expected at least 4 found: "
|
"Bad line of cmcov file expected at least 4 found: "
|
||||||
<< separateLine.size() << " " << file << " line:\n"
|
<< separateLine.size() << " " << file
|
||||||
"["
|
<< " line:\n"
|
||||||
|
"["
|
||||||
<< line << "]\n");
|
<< line << "]\n");
|
||||||
for (std::string::size_type i = 0; i < separateLine.size(); ++i) {
|
for (std::string::size_type i = 0; i < separateLine.size(); ++i) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "" << separateLine[1] << " ");
|
cmCTestLog(this->CTest, ERROR_MESSAGE, "" << separateLine[1] << " ");
|
||||||
|
|||||||
@@ -108,8 +108,9 @@ public:
|
|||||||
while (true) {
|
while (true) {
|
||||||
lastoffset = line.find('(', pos);
|
lastoffset = line.find('(', pos);
|
||||||
if (lastoffset == std::string::npos) {
|
if (lastoffset == std::string::npos) {
|
||||||
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, endnamepos
|
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< "File not found " << lastoffset << std::endl,
|
endnamepos << "File not found " << lastoffset
|
||||||
|
<< std::endl,
|
||||||
this->Coverage.Quiet);
|
this->Coverage.Quiet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,8 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
|||||||
this->Coverage.TotalCoverage[lastpath][lastoffset + linenumber] +=
|
this->Coverage.TotalCoverage[lastpath][lastoffset + linenumber] +=
|
||||||
count;
|
count;
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
|
"Can not find mumps file : "
|
||||||
<< lastroutine
|
<< lastroutine
|
||||||
<< " referenced in this line of mcov data:\n"
|
<< " referenced in this line of mcov data:\n"
|
||||||
"["
|
"["
|
||||||
@@ -102,9 +103,11 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
|||||||
lastoffset = lineoffset;
|
lastoffset = lineoffset;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Can not find mumps file : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< routine << " referenced in this line of mcov data:\n"
|
"Can not find mumps file : "
|
||||||
"["
|
<< routine
|
||||||
|
<< " referenced in this line of mcov data:\n"
|
||||||
|
"["
|
||||||
<< line << "]\n");
|
<< line << "]\n");
|
||||||
}
|
}
|
||||||
lastfunction = function;
|
lastfunction = function;
|
||||||
@@ -144,8 +147,9 @@ bool cmParseGTMCoverage::FindFunctionInMumpsFile(std::string const& filepath,
|
|||||||
linenum++; // move to next line count
|
linenum++; // move to next line count
|
||||||
}
|
}
|
||||||
lineoffset = 0;
|
lineoffset = 0;
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not find entry point : "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< function << " in " << filepath << "\n");
|
"Could not find entry point : " << function << " in " << filepath
|
||||||
|
<< "\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -221,8 +225,8 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
|
|||||||
}
|
}
|
||||||
// less then two arguments is an error
|
// less then two arguments is an error
|
||||||
if (args.size() < 2) {
|
if (args.size() < 2) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing mcov line: ["
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< line << "]\n");
|
"Error parsing mcov line: [" << line << "]\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
routine = args[0]; // the routine is the first argument
|
routine = args[0]; // the routine is the first argument
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ protected:
|
|||||||
|
|
||||||
if (this->PackagePath.empty()) {
|
if (this->PackagePath.empty()) {
|
||||||
if (!this->FindPackagePath(fileName)) {
|
if (!this->FindPackagePath(fileName)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: "
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< this->PackageName << "/" << fileName << std::endl);
|
"Cannot find file: " << this->PackageName << "/"
|
||||||
|
<< fileName << std::endl);
|
||||||
this->Coverage.Error++;
|
this->Coverage.Error++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,7 +153,8 @@ bool cmParsePHPCoverage::ReadFileInformation(std::istream& in)
|
|||||||
delete[] s;
|
delete[] s;
|
||||||
// read close quote
|
// read close quote
|
||||||
if (in.get(c) && c != '"') {
|
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");
|
<< "read [" << c << "]\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -184,8 +185,8 @@ bool cmParsePHPCoverage::ReadPHPData(const char* file)
|
|||||||
}
|
}
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
if (!this->ReadFileInformation(in)) {
|
if (!this->ReadFileInformation(in)) {
|
||||||
cmCTestLog(this->CTest, ERROR_MESSAGE, "Failed to read file #" << i
|
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||||
<< "\n");
|
"Failed to read file #" << i << "\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
in.get(c);
|
in.get(c);
|
||||||
|
|||||||
+93
-92
@@ -13,13 +13,13 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CM_PROCESS_BUF_SIZE 65536
|
#define CM_PROCESS_BUF_SIZE 65536
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
#include <io.h>
|
# include <io.h>
|
||||||
|
|
||||||
static int cmProcessGetPipes(int* fds)
|
static int cmProcessGetPipes(int* fds)
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,7 @@ static int cmProcessGetPipes(int* fds)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#include <errno.h>
|
# include <errno.h>
|
||||||
|
|
||||||
static int cmProcessGetPipes(int* fds)
|
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);
|
status = this->Process.spawn(loop, options, this);
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE, "Process not started\n "
|
cmCTestLog(this->Runner.GetCTest(), ERROR_MESSAGE,
|
||||||
<< this->Command << "\n[" << uv_strerror(status) << "]\n");
|
"Process not started\n " << this->Command << "\n["
|
||||||
|
<< uv_strerror(status) << "]\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +346,7 @@ void cmProcess::OnExit(int64_t exit_status, int term_signal)
|
|||||||
#else
|
#else
|
||||||
term_signal != 0
|
term_signal != 0
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
this->ProcessState = cmProcess::State::Exception;
|
this->ProcessState = cmProcess::State::Exception;
|
||||||
} else {
|
} else {
|
||||||
this->ProcessState = cmProcess::State::Exited;
|
this->ProcessState = cmProcess::State::Exited;
|
||||||
@@ -391,7 +392,7 @@ cmProcess::Exception cmProcess::GetExitException()
|
|||||||
{
|
{
|
||||||
auto exception = Exception::None;
|
auto exception = Exception::None;
|
||||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
auto exit_code = (DWORD) this->ExitValue;
|
auto exit_code = (DWORD)this->ExitValue;
|
||||||
if ((exit_code & 0xF0000000) != 0xC0000000) {
|
if ((exit_code & 0xF0000000) != 0xC0000000) {
|
||||||
return exception;
|
return exception;
|
||||||
}
|
}
|
||||||
@@ -415,12 +416,12 @@ cmProcess::Exception cmProcess::GetExitException()
|
|||||||
case STATUS_FLOAT_OVERFLOW:
|
case STATUS_FLOAT_OVERFLOW:
|
||||||
case STATUS_FLOAT_STACK_CHECK:
|
case STATUS_FLOAT_STACK_CHECK:
|
||||||
case STATUS_FLOAT_UNDERFLOW:
|
case STATUS_FLOAT_UNDERFLOW:
|
||||||
#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||||
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
||||||
#endif
|
# endif
|
||||||
#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||||
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
||||||
#endif
|
# endif
|
||||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||||
case STATUS_INTEGER_OVERFLOW:
|
case STATUS_INTEGER_OVERFLOW:
|
||||||
exception = Exception::Numerical;
|
exception = Exception::Numerical;
|
||||||
@@ -488,16 +489,16 @@ std::string cmProcess::GetExitExceptionString()
|
|||||||
case STATUS_FLOAT_UNDERFLOW:
|
case STATUS_FLOAT_UNDERFLOW:
|
||||||
exception_str = "Floating-point underflow";
|
exception_str = "Floating-point underflow";
|
||||||
break;
|
break;
|
||||||
#ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
# ifdef STATUS_FLOAT_MULTIPLE_FAULTS
|
||||||
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
case STATUS_FLOAT_MULTIPLE_FAULTS:
|
||||||
exception_str = "Floating-point exception (multiple faults)";
|
exception_str = "Floating-point exception (multiple faults)";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
# ifdef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||||
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
case STATUS_FLOAT_MULTIPLE_TRAPS:
|
||||||
exception_str = "Floating-point exception (multiple traps)";
|
exception_str = "Floating-point exception (multiple traps)";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
case STATUS_INTEGER_DIVIDE_BY_ZERO:
|
||||||
exception_str = "Integer divide-by-zero";
|
exception_str = "Integer divide-by-zero";
|
||||||
break;
|
break;
|
||||||
@@ -544,188 +545,188 @@ std::string cmProcess::GetExitExceptionString()
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
switch (this->Signal) {
|
switch (this->Signal) {
|
||||||
#ifdef SIGSEGV
|
# ifdef SIGSEGV
|
||||||
case SIGSEGV:
|
case SIGSEGV:
|
||||||
exception_str = "Segmentation fault";
|
exception_str = "Segmentation fault";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGBUS
|
# ifdef SIGBUS
|
||||||
#if !defined(SIGSEGV) || SIGBUS != SIGSEGV
|
# if !defined(SIGSEGV) || SIGBUS != SIGSEGV
|
||||||
case SIGBUS:
|
case SIGBUS:
|
||||||
exception_str = "Bus error";
|
exception_str = "Bus error";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGFPE
|
# ifdef SIGFPE
|
||||||
case SIGFPE:
|
case SIGFPE:
|
||||||
exception_str = "Floating-point exception";
|
exception_str = "Floating-point exception";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGILL
|
# ifdef SIGILL
|
||||||
case SIGILL:
|
case SIGILL:
|
||||||
exception_str = "Illegal instruction";
|
exception_str = "Illegal instruction";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGINT
|
# ifdef SIGINT
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
exception_str = "User interrupt";
|
exception_str = "User interrupt";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGABRT
|
# ifdef SIGABRT
|
||||||
case SIGABRT:
|
case SIGABRT:
|
||||||
exception_str = "Child aborted";
|
exception_str = "Child aborted";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGKILL
|
# ifdef SIGKILL
|
||||||
case SIGKILL:
|
case SIGKILL:
|
||||||
exception_str = "Child killed";
|
exception_str = "Child killed";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGTERM
|
# ifdef SIGTERM
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
exception_str = "Child terminated";
|
exception_str = "Child terminated";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGHUP
|
# ifdef SIGHUP
|
||||||
case SIGHUP:
|
case SIGHUP:
|
||||||
exception_str = "SIGHUP";
|
exception_str = "SIGHUP";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGQUIT
|
# ifdef SIGQUIT
|
||||||
case SIGQUIT:
|
case SIGQUIT:
|
||||||
exception_str = "SIGQUIT";
|
exception_str = "SIGQUIT";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGTRAP
|
# ifdef SIGTRAP
|
||||||
case SIGTRAP:
|
case SIGTRAP:
|
||||||
exception_str = "SIGTRAP";
|
exception_str = "SIGTRAP";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGIOT
|
# ifdef SIGIOT
|
||||||
#if !defined(SIGABRT) || SIGIOT != SIGABRT
|
# if !defined(SIGABRT) || SIGIOT != SIGABRT
|
||||||
case SIGIOT:
|
case SIGIOT:
|
||||||
exception_str = "SIGIOT";
|
exception_str = "SIGIOT";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGUSR1
|
# ifdef SIGUSR1
|
||||||
case SIGUSR1:
|
case SIGUSR1:
|
||||||
exception_str = "SIGUSR1";
|
exception_str = "SIGUSR1";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGUSR2
|
# ifdef SIGUSR2
|
||||||
case SIGUSR2:
|
case SIGUSR2:
|
||||||
exception_str = "SIGUSR2";
|
exception_str = "SIGUSR2";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGPIPE
|
# ifdef SIGPIPE
|
||||||
case SIGPIPE:
|
case SIGPIPE:
|
||||||
exception_str = "SIGPIPE";
|
exception_str = "SIGPIPE";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGALRM
|
# ifdef SIGALRM
|
||||||
case SIGALRM:
|
case SIGALRM:
|
||||||
exception_str = "SIGALRM";
|
exception_str = "SIGALRM";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGSTKFLT
|
# ifdef SIGSTKFLT
|
||||||
case SIGSTKFLT:
|
case SIGSTKFLT:
|
||||||
exception_str = "SIGSTKFLT";
|
exception_str = "SIGSTKFLT";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGCHLD
|
# ifdef SIGCHLD
|
||||||
case SIGCHLD:
|
case SIGCHLD:
|
||||||
exception_str = "SIGCHLD";
|
exception_str = "SIGCHLD";
|
||||||
break;
|
break;
|
||||||
#elif defined(SIGCLD)
|
# elif defined(SIGCLD)
|
||||||
case SIGCLD:
|
case SIGCLD:
|
||||||
exception_str = "SIGCLD";
|
exception_str = "SIGCLD";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGCONT
|
# ifdef SIGCONT
|
||||||
case SIGCONT:
|
case SIGCONT:
|
||||||
exception_str = "SIGCONT";
|
exception_str = "SIGCONT";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGSTOP
|
# ifdef SIGSTOP
|
||||||
case SIGSTOP:
|
case SIGSTOP:
|
||||||
exception_str = "SIGSTOP";
|
exception_str = "SIGSTOP";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGTSTP
|
# ifdef SIGTSTP
|
||||||
case SIGTSTP:
|
case SIGTSTP:
|
||||||
exception_str = "SIGTSTP";
|
exception_str = "SIGTSTP";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGTTIN
|
# ifdef SIGTTIN
|
||||||
case SIGTTIN:
|
case SIGTTIN:
|
||||||
exception_str = "SIGTTIN";
|
exception_str = "SIGTTIN";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGTTOU
|
# ifdef SIGTTOU
|
||||||
case SIGTTOU:
|
case SIGTTOU:
|
||||||
exception_str = "SIGTTOU";
|
exception_str = "SIGTTOU";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGURG
|
# ifdef SIGURG
|
||||||
case SIGURG:
|
case SIGURG:
|
||||||
exception_str = "SIGURG";
|
exception_str = "SIGURG";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGXCPU
|
# ifdef SIGXCPU
|
||||||
case SIGXCPU:
|
case SIGXCPU:
|
||||||
exception_str = "SIGXCPU";
|
exception_str = "SIGXCPU";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGXFSZ
|
# ifdef SIGXFSZ
|
||||||
case SIGXFSZ:
|
case SIGXFSZ:
|
||||||
exception_str = "SIGXFSZ";
|
exception_str = "SIGXFSZ";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGVTALRM
|
# ifdef SIGVTALRM
|
||||||
case SIGVTALRM:
|
case SIGVTALRM:
|
||||||
exception_str = "SIGVTALRM";
|
exception_str = "SIGVTALRM";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGPROF
|
# ifdef SIGPROF
|
||||||
case SIGPROF:
|
case SIGPROF:
|
||||||
exception_str = "SIGPROF";
|
exception_str = "SIGPROF";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGWINCH
|
# ifdef SIGWINCH
|
||||||
case SIGWINCH:
|
case SIGWINCH:
|
||||||
exception_str = "SIGWINCH";
|
exception_str = "SIGWINCH";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGPOLL
|
# ifdef SIGPOLL
|
||||||
case SIGPOLL:
|
case SIGPOLL:
|
||||||
exception_str = "SIGPOLL";
|
exception_str = "SIGPOLL";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGIO
|
# ifdef SIGIO
|
||||||
#if !defined(SIGPOLL) || SIGIO != SIGPOLL
|
# if !defined(SIGPOLL) || SIGIO != SIGPOLL
|
||||||
case SIGIO:
|
case SIGIO:
|
||||||
exception_str = "SIGIO";
|
exception_str = "SIGIO";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGPWR
|
# ifdef SIGPWR
|
||||||
case SIGPWR:
|
case SIGPWR:
|
||||||
exception_str = "SIGPWR";
|
exception_str = "SIGPWR";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGSYS
|
# ifdef SIGSYS
|
||||||
case SIGSYS:
|
case SIGSYS:
|
||||||
exception_str = "SIGSYS";
|
exception_str = "SIGSYS";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#ifdef SIGUNUSED
|
# ifdef SIGUNUSED
|
||||||
#if !defined(SIGSYS) || SIGUNUSED != SIGSYS
|
# if !defined(SIGSYS) || SIGUNUSED != SIGSYS
|
||||||
case SIGUNUSED:
|
case SIGUNUSED:
|
||||||
exception_str = "SIGUNUSED";
|
exception_str = "SIGUNUSED";
|
||||||
break;
|
break;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
default:
|
default:
|
||||||
exception_str = "Signal ";
|
exception_str = "Signal ";
|
||||||
exception_str += std::to_string(this->Signal);
|
exception_str += std::to_string(this->Signal);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#if defined(CURSES_HAVE_NCURSES_H)
|
#if defined(CURSES_HAVE_NCURSES_H)
|
||||||
#include <ncurses.h>
|
# include <ncurses.h>
|
||||||
#elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
|
#elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
|
||||||
#include <ncurses/ncurses.h>
|
# include <ncurses/ncurses.h>
|
||||||
#elif defined(CURSES_HAVE_NCURSES_CURSES_H)
|
#elif defined(CURSES_HAVE_NCURSES_CURSES_H)
|
||||||
#include <ncurses/curses.h>
|
# include <ncurses/curses.h>
|
||||||
#else
|
#else
|
||||||
#include <curses.h>
|
# include <curses.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|||||||
@@ -22,11 +22,13 @@ static const char* cmDocumentationName[][2] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const char* cmDocumentationUsage[][2] = {
|
static const char* cmDocumentationUsage[][2] = {
|
||||||
{ nullptr, " ccmake <path-to-source>\n"
|
{ nullptr,
|
||||||
" ccmake <path-to-existing-build>" },
|
" ccmake <path-to-source>\n"
|
||||||
{ nullptr, "Specify a source directory to (re-)generate a build system for "
|
" ccmake <path-to-existing-build>" },
|
||||||
"it in the current working directory. Specify an existing build "
|
{ nullptr,
|
||||||
"directory to re-generate its build system." },
|
"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 }
|
{ nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,9 +37,10 @@ static const char* cmDocumentationUsageNote[][2] = {
|
|||||||
{ nullptr, nullptr }
|
{ nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* cmDocumentationOptions[]
|
static const char* cmDocumentationOptions[][2] = {
|
||||||
[2] = { CMAKE_STANDARD_OPTIONS_TABLE,
|
CMAKE_STANDARD_OPTIONS_TABLE,
|
||||||
{ nullptr, nullptr } };
|
{ nullptr, nullptr }
|
||||||
|
};
|
||||||
|
|
||||||
cmCursesForm* cmCursesForm::CurrentForm = nullptr;
|
cmCursesForm* cmCursesForm::CurrentForm = nullptr;
|
||||||
|
|
||||||
|
|||||||
@@ -371,8 +371,9 @@ void cmCursesMainForm::PrintKeys(int process /* = 0 */)
|
|||||||
sprintf(thirdLine, toggleKeyInstruction,
|
sprintf(thirdLine, toggleKeyInstruction,
|
||||||
this->AdvancedMode ? "On" : "Off");
|
this->AdvancedMode ? "On" : "Off");
|
||||||
}
|
}
|
||||||
sprintf(secondLine, "Press [h] for help "
|
sprintf(secondLine,
|
||||||
"Press [q] to quit without generating");
|
"Press [h] for help "
|
||||||
|
"Press [q] to quit without generating");
|
||||||
}
|
}
|
||||||
|
|
||||||
curses_move(y - 4, 0);
|
curses_move(y - 4, 0);
|
||||||
@@ -412,9 +413,10 @@ void cmCursesMainForm::UpdateStatusBar(const char* message)
|
|||||||
curses_clear();
|
curses_clear();
|
||||||
curses_move(0, 0);
|
curses_move(0, 0);
|
||||||
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
|
char fmt[] = "Window is too small. A size of at least %dx%d is required.";
|
||||||
printw(fmt, (cmCursesMainForm::MIN_WIDTH < this->InitialWidth
|
printw(fmt,
|
||||||
? this->InitialWidth
|
(cmCursesMainForm::MIN_WIDTH < this->InitialWidth
|
||||||
: cmCursesMainForm::MIN_WIDTH),
|
? this->InitialWidth
|
||||||
|
: cmCursesMainForm::MIN_WIDTH),
|
||||||
cmCursesMainForm::MIN_HEIGHT);
|
cmCursesMainForm::MIN_HEIGHT);
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
wrefresh(stdscr);
|
wrefresh(stdscr);
|
||||||
@@ -568,10 +570,11 @@ int cmCursesMainForm::Configure(int noconfigure)
|
|||||||
}
|
}
|
||||||
int xx, yy;
|
int xx, yy;
|
||||||
getmaxyx(stdscr, yy, xx);
|
getmaxyx(stdscr, yy, xx);
|
||||||
cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(
|
cmCursesLongMessageForm* msgs =
|
||||||
this->Errors, cmSystemTools::GetErrorOccuredFlag()
|
new cmCursesLongMessageForm(this->Errors,
|
||||||
? "Errors occurred during the last pass."
|
cmSystemTools::GetErrorOccuredFlag()
|
||||||
: "CMake produced the following output.");
|
? "Errors occurred during the last pass."
|
||||||
|
: "CMake produced the following output.");
|
||||||
// reset error condition
|
// reset error condition
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
cmSystemTools::ResetErrorOccuredFlag();
|
||||||
CurrentForm = msgs;
|
CurrentForm = msgs;
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
// Record whether __attribute__ is currently defined. See purpose below.
|
// Record whether __attribute__ is currently defined. See purpose below.
|
||||||
#ifndef __attribute__
|
#ifndef __attribute__
|
||||||
#define cm_no__attribute__
|
# define cm_no__attribute__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__hpux)
|
#if defined(__hpux)
|
||||||
#define _BOOL_DEFINED
|
# define _BOOL_DEFINED
|
||||||
#include <sys/time.h>
|
# include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <form.h>
|
#include <form.h>
|
||||||
@@ -38,7 +38,7 @@ inline void curses_clear()
|
|||||||
// define __attribute__ as a macro. This breaks C++ headers
|
// define __attribute__ as a macro. This breaks C++ headers
|
||||||
// in some cases, so undefine it now.
|
// in some cases, so undefine it now.
|
||||||
#if defined(cm_no__attribute__) && defined(__attribute__)
|
#if defined(cm_no__attribute__) && defined(__attribute__)
|
||||||
#undef __attribute__
|
# undef __attribute__
|
||||||
#endif
|
#endif
|
||||||
#undef cm_no__attribute__
|
#undef cm_no__attribute__
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
#include "ui_AddCacheEntry.h"
|
#include "ui_AddCacheEntry.h"
|
||||||
|
|
||||||
class AddCacheEntry : public QWidget, public Ui::AddCacheEntry
|
class AddCacheEntry
|
||||||
|
: public QWidget
|
||||||
|
, public Ui::AddCacheEntry
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -27,9 +27,10 @@ static const char* cmDocumentationName[][2] = { { nullptr,
|
|||||||
{ nullptr, nullptr } };
|
{ nullptr, nullptr } };
|
||||||
|
|
||||||
static const char* cmDocumentationUsage[][2] = {
|
static const char* cmDocumentationUsage[][2] = {
|
||||||
{ nullptr, " cmake-gui [options]\n"
|
{ nullptr,
|
||||||
" cmake-gui [options] <path-to-source>\n"
|
" cmake-gui [options]\n"
|
||||||
" cmake-gui [options] <path-to-existing-build>" },
|
" cmake-gui [options] <path-to-source>\n"
|
||||||
|
" cmake-gui [options] <path-to-existing-build>" },
|
||||||
{ nullptr, nullptr }
|
{ nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -192,10 +193,10 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
#include "cm_sys_stat.h"
|
# include "cm_sys_stat.h"
|
||||||
#include <errno.h>
|
# include <errno.h>
|
||||||
#include <string.h>
|
# include <string.h>
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
|
static bool cmOSXInstall(std::string const& dir, std::string const& tool)
|
||||||
{
|
{
|
||||||
if (tool.empty()) {
|
if (tool.empty()) {
|
||||||
|
|||||||
@@ -842,7 +842,7 @@ void CMakeSetupDialog::doAbout()
|
|||||||
"Qt is licensed under terms of the GNU LGPLv" USE_LGPL ", available at:\n"
|
"Qt is licensed under terms of the GNU LGPLv" USE_LGPL ", available at:\n"
|
||||||
" \"%3\""
|
" \"%3\""
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
msg = msg.arg(cmVersion::GetCMakeVersion());
|
msg = msg.arg(cmVersion::GetCMakeVersion());
|
||||||
msg = msg.arg(qVersion());
|
msg = msg.arg(qVersion());
|
||||||
#ifdef USE_LGPL
|
#ifdef USE_LGPL
|
||||||
@@ -989,8 +989,9 @@ void CMakeSetupDialog::removeSelectedCacheEntries()
|
|||||||
void CMakeSetupDialog::selectionChanged()
|
void CMakeSetupDialog::selectionChanged()
|
||||||
{
|
{
|
||||||
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
|
QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows();
|
||||||
if (idxs.count() && (this->CurrentState == ReadyConfigure ||
|
if (idxs.count() &&
|
||||||
this->CurrentState == ReadyGenerate)) {
|
(this->CurrentState == ReadyConfigure ||
|
||||||
|
this->CurrentState == ReadyGenerate)) {
|
||||||
this->RemoveEntry->setEnabled(true);
|
this->RemoveEntry->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
this->RemoveEntry->setEnabled(false);
|
this->RemoveEntry->setEnabled(false);
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ class QProgressBar;
|
|||||||
class QToolButton;
|
class QToolButton;
|
||||||
|
|
||||||
/// Qt user interface for CMake
|
/// Qt user interface for CMake
|
||||||
class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog
|
class CMakeSetupDialog
|
||||||
|
: public QMainWindow
|
||||||
|
, public Ui::CMakeSetupDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
#include <ui_Compilers.h>
|
#include <ui_Compilers.h>
|
||||||
|
|
||||||
class Compilers : public QWidget, public Ui::Compilers
|
class Compilers
|
||||||
|
: public QWidget
|
||||||
|
, public Ui::Compilers
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! the page that gives basic options for native compilers
|
//! 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
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -83,7 +85,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
//! the page that gives options for cross compilers
|
//! the page that gives options for cross compilers
|
||||||
class CrossCompilerSetup : public QWizardPage, protected Ui::CrossCompiler
|
class CrossCompilerSetup
|
||||||
|
: public QWizardPage
|
||||||
|
, protected Ui::CrossCompiler
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#include "qt_windows.h" // For SetErrorMode
|
# include "qt_windows.h" // For SetErrorMode
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QCMake::QCMake(QObject* p)
|
QCMake::QCMake(QObject* p)
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4127)
|
# pragma warning(disable : 4127)
|
||||||
#pragma warning(disable : 4512)
|
# pragma warning(disable : 4512)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
class QString;
|
class QString;
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
class RegexExplorer : public QDialog, public Ui::RegexExplorer
|
class RegexExplorer
|
||||||
|
: public QDialog
|
||||||
|
, public Ui::RegexExplorer
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
/**
|
/**
|
||||||
* Dialog window for setting the warning message related options.
|
* 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
|
Q_OBJECT
|
||||||
|
|
||||||
|
|||||||
+61
-60
@@ -8,26 +8,26 @@
|
|||||||
-------------------------------------------------------------------------*/
|
-------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*----------------------------------------------------------------------
|
*----------------------------------------------------------------------
|
||||||
* Program: dumpexts.exe
|
* Program: dumpexts.exe
|
||||||
* Author: Gordon Chaffee
|
* Author: Gordon Chaffee
|
||||||
*
|
*
|
||||||
* History: The real functionality of this file was written by
|
* History: The real functionality of this file was written by
|
||||||
* Matt Pietrek in 1993 in his pedump utility. I've
|
* Matt Pietrek in 1993 in his pedump utility. I've
|
||||||
* modified it to dump the externals in a bunch of object
|
* modified it to dump the externals in a bunch of object
|
||||||
* files to create a .def file.
|
* files to create a .def file.
|
||||||
*
|
*
|
||||||
* Notes: Visual C++ puts an underscore before each exported symbol.
|
* Notes: Visual C++ puts an underscore before each exported symbol.
|
||||||
* This file removes them. I don't know if this is a problem
|
* This file removes them. I don't know if this is a problem
|
||||||
* this other compilers. If _MSC_VER is defined,
|
* this other compilers. If _MSC_VER is defined,
|
||||||
* the underscore is removed. If not, it isn't. To get a
|
* the underscore is removed. If not, it isn't. To get a
|
||||||
* full dump of an object file, use the -f option. This can
|
* full dump of an object file, use the -f option. This can
|
||||||
* help determine the something that may be different with a
|
* help determine the something that may be different with a
|
||||||
* compiler other than Visual C++.
|
* compiler other than Visual C++.
|
||||||
* ======================================
|
* ======================================
|
||||||
* Corrections (Axel 2006-04-04):
|
* Corrections (Axel 2006-04-04):
|
||||||
* Conversion to C++. Mostly.
|
* Conversion to C++. Mostly.
|
||||||
*
|
*
|
||||||
* Extension (Axel 2006-03-15)
|
* Extension (Axel 2006-03-15)
|
||||||
* As soon as an object file contains an /EXPORT directive (which
|
* As soon as an object file contains an /EXPORT directive (which
|
||||||
* is generated by the compiler when a symbol is declared as
|
* is generated by the compiler when a symbol is declared as
|
||||||
@@ -37,30 +37,31 @@
|
|||||||
* programmer).
|
* programmer).
|
||||||
*
|
*
|
||||||
* ======================================
|
* ======================================
|
||||||
* ======================================
|
* ======================================
|
||||||
* Corrections (Valery Fine 23/02/98):
|
* Corrections (Valery Fine 23/02/98):
|
||||||
*
|
*
|
||||||
* The "(vector) deleting destructor" MUST not be exported
|
* The "(vector) deleting destructor" MUST not be exported
|
||||||
* To recognize it the following test are introduced:
|
* To recognize it the following test are introduced:
|
||||||
* "@@UAEPAXI@Z" scalar deleting dtor
|
* "@@UAEPAXI@Z" scalar deleting dtor
|
||||||
* "@@QAEPAXI@Z" vector deleting dtor
|
* "@@QAEPAXI@Z" vector deleting dtor
|
||||||
* "AEPAXI@Z" vector deleting dtor with thunk adjustor
|
* "AEPAXI@Z" vector deleting dtor with thunk adjustor
|
||||||
* ======================================
|
* ======================================
|
||||||
* Corrections (Valery Fine 12/02/97):
|
* Corrections (Valery Fine 12/02/97):
|
||||||
*
|
*
|
||||||
* It created a wrong EXPORTS for the global pointers and constants.
|
* It created a wrong EXPORTS for the global pointers and constants.
|
||||||
* The Section Header has been involved to discover the missing information
|
* The Section Header has been involved to discover the missing information
|
||||||
* Now the pointers are correctly supplied with "DATA" descriptor
|
* Now the pointers are correctly supplied with "DATA" descriptor
|
||||||
* the constants with no extra descriptor.
|
* the constants with no extra descriptor.
|
||||||
*
|
*
|
||||||
* Corrections (Valery Fine 16/09/96):
|
* Corrections (Valery Fine 16/09/96):
|
||||||
*
|
*
|
||||||
* It didn't work for C++ code with global variables and class definitions
|
* It didn't work for C++ code with global variables and class definitions
|
||||||
* The DumpExternalObject function has been introduced to generate .DEF file
|
* The DumpExternalObject function has been introduced to generate .DEF
|
||||||
*
|
*file
|
||||||
* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
|
*
|
||||||
*----------------------------------------------------------------------
|
* Author: Valery Fine 16/09/96 (E-mail: fine@vxcern.cern.ch)
|
||||||
*/
|
*----------------------------------------------------------------------
|
||||||
|
*/
|
||||||
#include "bindexplib.h"
|
#include "bindexplib.h"
|
||||||
|
|
||||||
#include "cmsys/Encoding.hxx"
|
#include "cmsys/Encoding.hxx"
|
||||||
@@ -69,19 +70,19 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#ifndef IMAGE_FILE_MACHINE_ARM
|
#ifndef IMAGE_FILE_MACHINE_ARM
|
||||||
#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
|
# define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef IMAGE_FILE_MACHINE_THUMB
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef IMAGE_FILE_MACHINE_ARMNT
|
#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
|
#endif
|
||||||
|
|
||||||
#ifndef IMAGE_FILE_MACHINE_ARM64
|
#ifndef IMAGE_FILE_MACHINE_ARM64
|
||||||
#define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
|
# define IMAGE_FILE_MACHINE_ARM64 0xaa64 // ARM64 Little-Endian
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct cmANON_OBJECT_HEADER_BIGOBJ
|
typedef struct cmANON_OBJECT_HEADER_BIGOBJ
|
||||||
@@ -188,7 +189,7 @@ public:
|
|||||||
{
|
{
|
||||||
this->ObjectImageHeader = ih;
|
this->ObjectImageHeader = ih;
|
||||||
this->SymbolTable =
|
this->SymbolTable =
|
||||||
(SymbolTableType*)((DWORD_PTR) this->ObjectImageHeader +
|
(SymbolTableType*)((DWORD_PTR)this->ObjectImageHeader +
|
||||||
this->ObjectImageHeader->PointerToSymbolTable);
|
this->ObjectImageHeader->PointerToSymbolTable);
|
||||||
this->SectionHeaders = GetSectionHeaderOffset(this->ObjectImageHeader);
|
this->SectionHeaders = GetSectionHeaderOffset(this->ObjectImageHeader);
|
||||||
this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
|
this->SymbolCount = this->ObjectImageHeader->NumberOfSymbols;
|
||||||
@@ -227,8 +228,8 @@ public:
|
|||||||
(pSymbolTable->Type == 0x20 || pSymbolTable->Type == 0x0)) {
|
(pSymbolTable->Type == 0x20 || pSymbolTable->Type == 0x0)) {
|
||||||
if (pSymbolTable->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) {
|
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) {
|
if (pSymbolTable->N.Name.Short != 0) {
|
||||||
symbol.clear();
|
symbol.clear();
|
||||||
symbol.insert(0, (const char*)pSymbolTable->N.ShortName, 8);
|
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;
|
i += pSymbolTable->NumberOfAuxSymbols;
|
||||||
pSymbolTable += pSymbolTable->NumberOfAuxSymbols;
|
pSymbolTable += pSymbolTable->NumberOfAuxSymbols;
|
||||||
pSymbolTable++;
|
pSymbolTable++;
|
||||||
@@ -345,11 +346,11 @@ bool DumpFile(const char* filename, std::set<std::string>& symbols,
|
|||||||
(imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) &&
|
(imageHeader->Machine == IMAGE_FILE_MACHINE_ARM64)) &&
|
||||||
(imageHeader->Characteristics == 0)) {
|
(imageHeader->Characteristics == 0)) {
|
||||||
/*
|
/*
|
||||||
* The tests above are checking for IMAGE_FILE_HEADER.Machine
|
* The tests above are checking for IMAGE_FILE_HEADER.Machine
|
||||||
* if it contains supported machine formats (currently ARM and x86)
|
* if it contains supported machine formats (currently ARM and x86)
|
||||||
* and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
|
* and IMAGE_FILE_HEADER.Characteristics == 0 indicating that
|
||||||
* this is not linked COFF OBJ file;
|
* this is not linked COFF OBJ file;
|
||||||
*/
|
*/
|
||||||
DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL> symbolDumper(
|
DumpSymbols<IMAGE_FILE_HEADER, IMAGE_SYMBOL> symbolDumper(
|
||||||
(PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols,
|
(PIMAGE_FILE_HEADER)lpFileBase, symbols, dataSymbols,
|
||||||
(imageHeader->Machine == IMAGE_FILE_MACHINE_I386));
|
(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;
|
(cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase;
|
||||||
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
|
if (h->Sig1 == 0x0 && h->Sig2 == 0xffff) {
|
||||||
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
|
DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX>
|
||||||
symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
|
symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*)lpFileBase, symbols,
|
||||||
dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
|
dataSymbols, (h->Machine == IMAGE_FILE_MACHINE_I386));
|
||||||
symbolDumper.DumpObjFile();
|
symbolDumper.DumpObjFile();
|
||||||
} else {
|
} else {
|
||||||
printf("unrecognized file format in '%s'\n", filename);
|
printf("unrecognized file format in '%s'\n", filename);
|
||||||
|
|||||||
@@ -211,8 +211,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args,
|
|||||||
if (!aliasedTarget) {
|
if (!aliasedTarget) {
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << "cannot create ALIAS target \"" << libName << "\" because target \""
|
e << "cannot create ALIAS target \"" << libName << "\" because target \""
|
||||||
<< aliasedName << "\" does not already "
|
<< aliasedName
|
||||||
"exist.";
|
<< "\" does not already "
|
||||||
|
"exist.";
|
||||||
this->SetError(e.str());
|
this->SetError(e.str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-19
@@ -5,24 +5,24 @@
|
|||||||
#include "cm_uv.h"
|
#include "cm_uv.h"
|
||||||
|
|
||||||
#ifndef CMAKE_USE_SYSTEM_LIBUV
|
#ifndef CMAKE_USE_SYSTEM_LIBUV
|
||||||
#ifdef _WIN32
|
# ifdef _WIN32
|
||||||
#define CM_HAVE_CPU_AFFINITY
|
# define CM_HAVE_CPU_AFFINITY
|
||||||
#include <windows.h>
|
# include <windows.h>
|
||||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
# elif defined(__linux__) || defined(__FreeBSD__)
|
||||||
#define CM_HAVE_CPU_AFFINITY
|
# define CM_HAVE_CPU_AFFINITY
|
||||||
#include <pthread.h>
|
# include <pthread.h>
|
||||||
#include <sched.h>
|
# include <sched.h>
|
||||||
#if defined(__FreeBSD__)
|
# if defined(__FreeBSD__)
|
||||||
#include <pthread_np.h>
|
# include <pthread_np.h>
|
||||||
#include <sys/cpuset.h>
|
# include <sys/cpuset.h>
|
||||||
#include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
# endif
|
||||||
#if defined(__linux__)
|
# if defined(__linux__)
|
||||||
typedef cpu_set_t cm_cpuset_t;
|
typedef cpu_set_t cm_cpuset_t;
|
||||||
#else
|
# else
|
||||||
typedef cpuset_t cm_cpuset_t;
|
typedef cpuset_t cm_cpuset_t;
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace cmAffinity {
|
namespace cmAffinity {
|
||||||
@@ -33,7 +33,7 @@ std::set<size_t> GetProcessorsAvailable()
|
|||||||
#ifdef CM_HAVE_CPU_AFFINITY
|
#ifdef CM_HAVE_CPU_AFFINITY
|
||||||
int cpumask_size = uv_cpumask_size();
|
int cpumask_size = uv_cpumask_size();
|
||||||
if (cpumask_size > 0) {
|
if (cpumask_size > 0) {
|
||||||
#ifdef _WIN32
|
# ifdef _WIN32
|
||||||
DWORD_PTR procmask;
|
DWORD_PTR procmask;
|
||||||
DWORD_PTR sysmask;
|
DWORD_PTR sysmask;
|
||||||
if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask) !=
|
if (GetProcessAffinityMask(GetCurrentProcess(), &procmask, &sysmask) !=
|
||||||
@@ -44,7 +44,7 @@ std::set<size_t> GetProcessorsAvailable()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
# else
|
||||||
cm_cpuset_t cpuset;
|
cm_cpuset_t cpuset;
|
||||||
CPU_ZERO(&cpuset); // NOLINT(clang-tidy)
|
CPU_ZERO(&cpuset); // NOLINT(clang-tidy)
|
||||||
if (pthread_getaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) == 0) {
|
if (pthread_getaffinity_np(pthread_self(), sizeof(cpuset), &cpuset) == 0) {
|
||||||
@@ -54,7 +54,7 @@ std::set<size_t> GetProcessorsAvailable()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return processorsAvailable;
|
return processorsAvailable;
|
||||||
|
|||||||
+10
-10
@@ -375,9 +375,9 @@ using std::size;
|
|||||||
|
|
||||||
// std::size backport from C++17.
|
// std::size backport from C++17.
|
||||||
template <class C>
|
template <class C>
|
||||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||||
constexpr
|
constexpr
|
||||||
#endif
|
# endif
|
||||||
auto
|
auto
|
||||||
size(C const& c) -> decltype(c.size())
|
size(C const& c) -> decltype(c.size())
|
||||||
{
|
{
|
||||||
@@ -385,9 +385,9 @@ constexpr
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, size_t N>
|
template <typename T, size_t N>
|
||||||
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
# if !defined(_MSC_VER) || _MSC_VER >= 1900
|
||||||
constexpr
|
constexpr
|
||||||
#endif
|
# endif
|
||||||
std::size_t
|
std::size_t
|
||||||
size(const T (&)[N]) throw()
|
size(const T (&)[N]) throw()
|
||||||
{
|
{
|
||||||
@@ -405,22 +405,22 @@ using std::cend;
|
|||||||
|
|
||||||
// std::c{begin,end} backport from C++14
|
// std::c{begin,end} backport from C++14
|
||||||
template <class C>
|
template <class C>
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
auto cbegin(C const& c)
|
auto cbegin(C const& c)
|
||||||
#else
|
# else
|
||||||
constexpr auto cbegin(C const& c) noexcept(noexcept(std::begin(c)))
|
constexpr auto cbegin(C const& c) noexcept(noexcept(std::begin(c)))
|
||||||
#endif
|
# endif
|
||||||
-> decltype(std::begin(c))
|
-> decltype(std::begin(c))
|
||||||
{
|
{
|
||||||
return std::begin(c);
|
return std::begin(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
# if defined(_MSC_VER) && _MSC_VER < 1900
|
||||||
auto cend(C const& c)
|
auto cend(C const& c)
|
||||||
#else
|
# else
|
||||||
constexpr auto cend(C const& c) noexcept(noexcept(std::end(c)))
|
constexpr auto cend(C const& c) noexcept(noexcept(std::end(c)))
|
||||||
#endif
|
# endif
|
||||||
-> decltype(std::end(c))
|
-> decltype(std::end(c))
|
||||||
{
|
{
|
||||||
return std::end(c);
|
return std::end(c);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifndef __LA_SSIZE_T
|
#ifndef __LA_SSIZE_T
|
||||||
#define __LA_SSIZE_T la_ssize_t
|
# define __LA_SSIZE_T la_ssize_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static std::string cm_archive_error_string(struct archive* a)
|
static std::string cm_archive_error_string(struct archive* a)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#if !defined(CMAKE_BUILD_WITH_CMAKE)
|
#if !defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#error "cmArchiveWrite not allowed during bootstrap build!"
|
# error "cmArchiveWrite not allowed during bootstrap build!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
@@ -28,6 +28,7 @@ public:
|
|||||||
void Clear() { this->IsValueSet = false; }
|
void Clear() { this->IsValueSet = false; }
|
||||||
bool IsSet() const { return this->IsValueSet; }
|
bool IsSet() const { return this->IsValueSet; }
|
||||||
T Get() const { return Value; }
|
T Get() const { return Value; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T Value;
|
T Value;
|
||||||
bool IsValueSet;
|
bool IsValueSet;
|
||||||
@@ -41,6 +42,7 @@ class cmArchiveWrite
|
|||||||
{
|
{
|
||||||
typedef void (cmArchiveWrite::*safe_bool)();
|
typedef void (cmArchiveWrite::*safe_bool)();
|
||||||
void safe_bool_true() {}
|
void safe_bool_true() {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** Compression type. */
|
/** Compression type. */
|
||||||
enum Compress
|
enum Compress
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
#include "cmsys/SystemInformation.hxx"
|
#include "cmsys/SystemInformation.hxx"
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include "cmAlgorithms.h"
|
# include "cmAlgorithms.h"
|
||||||
#include "cmGlobalGenerator.h"
|
# include "cmGlobalGenerator.h"
|
||||||
#include "cmGlobalVisualStudio15Generator.h"
|
# include "cmGlobalVisualStudio15Generator.h"
|
||||||
#include "cmSystemTools.h"
|
# include "cmSystemTools.h"
|
||||||
#include "cmVSSetupHelper.h"
|
# include "cmVSSetupHelper.h"
|
||||||
#define HAVE_VS_SETUP_HELPER
|
# define HAVE_VS_SETUP_HELPER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class cmExecutionStatus;
|
class cmExecutionStatus;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifdef __QNX__
|
#ifdef __QNX__
|
||||||
#include <malloc.h> /* for malloc/free on QNX */
|
# include <malloc.h> /* for malloc/free on QNX */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -395,9 +395,10 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared,
|
|||||||
for (i = 0; i < numSrcs; ++i) {
|
for (i = 0; i < numSrcs; ++i) {
|
||||||
srcs2.push_back(srcs[i]);
|
srcs2.push_back(srcs[i]);
|
||||||
}
|
}
|
||||||
mf->AddLibrary(libname, (shared ? cmStateEnums::SHARED_LIBRARY
|
mf->AddLibrary(
|
||||||
: cmStateEnums::STATIC_LIBRARY),
|
libname,
|
||||||
srcs2);
|
(shared ? cmStateEnums::SHARED_LIBRARY : cmStateEnums::STATIC_LIBRARY),
|
||||||
|
srcs2);
|
||||||
}
|
}
|
||||||
|
|
||||||
char CCONV* cmExpandVariablesInString(void* arg, const char* source,
|
char CCONV* cmExpandVariablesInString(void* arg, const char* source,
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __WATCOMC__
|
#ifdef __WATCOMC__
|
||||||
#define CCONV __cdecl
|
# define CCONV __cdecl
|
||||||
#else
|
#else
|
||||||
#define CCONV
|
# define CCONV
|
||||||
#endif
|
#endif
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
this is the structure of function entry points that a plugin may call. This
|
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
|
CM_PLUGIN_EXPORT should be used by plugins
|
||||||
=========================================================================*/
|
=========================================================================*/
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define CM_PLUGIN_EXPORT __declspec(dllexport)
|
# define CM_PLUGIN_EXPORT __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
#define CM_PLUGIN_EXPORT
|
# define CM_PLUGIN_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*=========================================================================
|
/*=========================================================================
|
||||||
|
|||||||
+139
-104
@@ -55,7 +55,7 @@
|
|||||||
#include "cmake.h"
|
#include "cmake.h"
|
||||||
|
|
||||||
#if defined(__BEOS__) || defined(__HAIKU__)
|
#if defined(__BEOS__) || defined(__HAIKU__)
|
||||||
#include <be/kernel/OS.h> /* disable_debugger() API. */
|
# include <be/kernel/OS.h> /* disable_debugger() API. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUGOUT \
|
#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
|
// curl_getdate no longer assumes the day is today
|
||||||
sprintf(buf, "%d%02d%02d %s", lctime->tm_year + 1900, lctime->tm_mon + 1,
|
sprintf(buf, "%d%02d%02d %s", lctime->tm_year + 1900, lctime->tm_mon + 1,
|
||||||
lctime->tm_mday, str.c_str());
|
lctime->tm_mday, str.c_str());
|
||||||
cmCTestLog(this, OUTPUT, "Determine Nightly Start Time"
|
cmCTestLog(this, OUTPUT,
|
||||||
<< std::endl
|
"Determine Nightly Start Time" << std::endl
|
||||||
<< " Specified time: " << str << std::endl);
|
<< " Specified time: " << str
|
||||||
|
<< std::endl);
|
||||||
// Convert the nightly start time to seconds. Since we are
|
// Convert the nightly start time to seconds. Since we are
|
||||||
// providing only a time and a timezone, the current date of
|
// providing only a time and a timezone, the current date of
|
||||||
// the local machine is assumed. Consequently, nightlySeconds
|
// 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
|
// time of the current open dashboard
|
||||||
ntime -= dayLength;
|
ntime -= dayLength;
|
||||||
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
|
cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl);
|
||||||
cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime
|
cmCTestLog(this, DEBUG,
|
||||||
<< std::endl);
|
" Future time, subtract day: " << ntime << std::endl);
|
||||||
}
|
}
|
||||||
while (tctime > (ntime + dayLength)) {
|
while (tctime > (ntime + dayLength)) {
|
||||||
ntime += dayLength;
|
ntime += dayLength;
|
||||||
cmCTestLog(this, DEBUG, " Past time, add day: " << ntime << std::endl);
|
cmCTestLog(this, DEBUG, " Past time, add day: " << ntime << std::endl);
|
||||||
}
|
}
|
||||||
cmCTestLog(this, DEBUG, "nightlySeconds: " << ntime << std::endl);
|
cmCTestLog(this, DEBUG, "nightlySeconds: " << ntime << std::endl);
|
||||||
cmCTestLog(this, DEBUG, " Current time: " << tctime << " Nightly time: "
|
cmCTestLog(this, DEBUG,
|
||||||
<< ntime << std::endl);
|
" Current time: " << tctime << " Nightly time: " << ntime
|
||||||
|
<< std::endl);
|
||||||
if (tomorrowtag) {
|
if (tomorrowtag) {
|
||||||
cmCTestLog(this, OUTPUT, " Use future tag, Add a day" << std::endl);
|
cmCTestLog(this, OUTPUT, " Use future tag, Add a day" << std::endl);
|
||||||
ntime += dayLength;
|
ntime += dayLength;
|
||||||
@@ -390,13 +392,14 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||||
if (this->ProduceXML) {
|
if (this->ProduceXML) {
|
||||||
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
cmCTestOptionalLog(this, DEBUG, "Here: " << __LINE__ << std::endl, quiet);
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
this, OUTPUT, " Site: "
|
" Site: "
|
||||||
<< this->GetCTestConfiguration("Site") << std::endl
|
<< this->GetCTestConfiguration("Site") << std::endl
|
||||||
<< " Build name: "
|
<< " Build name: "
|
||||||
<< cmCTest::SafeBuildIdField(this->GetCTestConfiguration("BuildName"))
|
<< cmCTest::SafeBuildIdField(
|
||||||
<< std::endl,
|
this->GetCTestConfiguration("BuildName"))
|
||||||
quiet);
|
<< std::endl,
|
||||||
|
quiet);
|
||||||
cmCTestOptionalLog(this, DEBUG, "Produce XML is on" << std::endl, quiet);
|
cmCTestOptionalLog(this, DEBUG, "Produce XML is on" << std::endl, quiet);
|
||||||
if (this->TestModel == cmCTest::NIGHTLY &&
|
if (this->TestModel == cmCTest::NIGHTLY &&
|
||||||
this->GetCTestConfiguration("NightlyStartTime").empty()) {
|
this->GetCTestConfiguration("NightlyStartTime").empty()) {
|
||||||
@@ -431,16 +434,16 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
std::string testingDir = this->BinaryDir + "/Testing";
|
std::string testingDir = this->BinaryDir + "/Testing";
|
||||||
if (cmSystemTools::FileExists(testingDir)) {
|
if (cmSystemTools::FileExists(testingDir)) {
|
||||||
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "File "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< testingDir
|
"File " << testingDir
|
||||||
<< " is in the place of the testing directory"
|
<< " is in the place of the testing directory"
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< testingDir << std::endl);
|
"Cannot create directory " << testingDir << std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -518,9 +521,10 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
}
|
}
|
||||||
ofs.close();
|
ofs.close();
|
||||||
if (nullptr == command) {
|
if (nullptr == command) {
|
||||||
cmCTestOptionalLog(this, OUTPUT, "Create new tag: "
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
<< tag << " - " << this->GetTestModelString()
|
"Create new tag: " << tag << " - "
|
||||||
<< std::endl,
|
<< this->GetTestModelString()
|
||||||
|
<< std::endl,
|
||||||
quiet);
|
quiet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -539,8 +543,9 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tag.empty()) {
|
if (tag.empty()) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot read existing TAG file in "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< testingDir << std::endl);
|
"Cannot read existing TAG file in " << testingDir
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -558,24 +563,27 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command)
|
|||||||
|
|
||||||
if (model != this->TestModel && model != cmCTest::UNKNOWN &&
|
if (model != this->TestModel && model != cmCTest::UNKNOWN &&
|
||||||
this->TestModel != cmCTest::UNKNOWN) {
|
this->TestModel != cmCTest::UNKNOWN) {
|
||||||
cmCTestOptionalLog(this, WARNING, "Model given in TAG does not match "
|
cmCTestOptionalLog(this, WARNING,
|
||||||
"model given in ctest_start()"
|
"Model given in TAG does not match "
|
||||||
|
"model given in ctest_start()"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
quiet);
|
quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->SpecificTrack.empty() && track != this->SpecificTrack) {
|
if (!this->SpecificTrack.empty() && track != this->SpecificTrack) {
|
||||||
cmCTestOptionalLog(this, WARNING, "Track given in TAG does not match "
|
cmCTestOptionalLog(this, WARNING,
|
||||||
"track given in ctest_start()"
|
"Track given in TAG does not match "
|
||||||
|
"track given in ctest_start()"
|
||||||
<< std::endl,
|
<< std::endl,
|
||||||
quiet);
|
quiet);
|
||||||
} else {
|
} else {
|
||||||
this->SpecificTrack = track;
|
this->SpecificTrack = track;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmCTestOptionalLog(this, OUTPUT, " Use existing tag: "
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
<< tag << " - " << this->GetTestModelString()
|
" Use existing tag: " << tag << " - "
|
||||||
<< std::endl,
|
<< this->GetTestModelString()
|
||||||
|
<< std::endl,
|
||||||
quiet);
|
quiet);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -613,8 +621,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!fname.empty()) {
|
if (!fname.empty()) {
|
||||||
cmCTestOptionalLog(this, OUTPUT, " Reading ctest configuration file: "
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
<< fname << std::endl,
|
" Reading ctest configuration file: " << fname
|
||||||
|
<< std::endl,
|
||||||
command->ShouldBeQuiet());
|
command->ShouldBeQuiet());
|
||||||
bool readit = mf->ReadDependentFile(fname.c_str());
|
bool readit = mf->ReadDependentFile(fname.c_str());
|
||||||
if (!readit) {
|
if (!readit) {
|
||||||
@@ -629,7 +638,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
<< bld_dir_fname << std::endl,
|
<< bld_dir_fname << std::endl,
|
||||||
command->ShouldBeQuiet());
|
command->ShouldBeQuiet());
|
||||||
cmCTestOptionalLog(
|
cmCTestOptionalLog(
|
||||||
this, WARNING, "Cannot locate CTest configuration: in SourceDirectory: "
|
this, WARNING,
|
||||||
|
"Cannot locate CTest configuration: in SourceDirectory: "
|
||||||
<< src_dir_fname << std::endl,
|
<< src_dir_fname << std::endl,
|
||||||
command->ShouldBeQuiet());
|
command->ShouldBeQuiet());
|
||||||
}
|
}
|
||||||
@@ -645,7 +655,8 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
if (dartVersion) {
|
if (dartVersion) {
|
||||||
this->DartVersion = atoi(dartVersion);
|
this->DartVersion = atoi(dartVersion);
|
||||||
if (this->DartVersion < 0) {
|
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."
|
<< dartVersion << ". Please specify the version number."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
@@ -656,9 +667,9 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
|||||||
if (!this->Initialize(bld_dir.c_str(), command)) {
|
if (!this->Initialize(bld_dir.c_str(), command)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cmCTestOptionalLog(this, OUTPUT, " Use "
|
cmCTestOptionalLog(this, OUTPUT,
|
||||||
<< this->GetTestModelString()
|
" Use " << this->GetTestModelString() << " tag: "
|
||||||
<< " tag: " << this->GetCurrentTag() << std::endl,
|
<< this->GetCurrentTag() << std::endl,
|
||||||
command->ShouldBeQuiet());
|
command->ShouldBeQuiet());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -677,13 +688,13 @@ bool cmCTest::UpdateCTestConfiguration()
|
|||||||
if (!cmSystemTools::FileExists(fileName)) {
|
if (!cmSystemTools::FileExists(fileName)) {
|
||||||
// No need to exit if we are not producing XML
|
// No need to exit if we are not producing XML
|
||||||
if (this->ProduceXML) {
|
if (this->ProduceXML) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot find file: " << fileName << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" << fileName
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< "\n");
|
"Parse Config file:" << fileName << "\n");
|
||||||
// parse the dart test file
|
// parse the dart test file
|
||||||
cmsys::ifstream fin(fileName.c_str());
|
cmsys::ifstream fin(fileName.c_str());
|
||||||
|
|
||||||
@@ -774,8 +785,9 @@ bool cmCTest::SetTest(const char* ttype, bool report)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (report) {
|
if (report) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \""
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< ttype << "\" yet..." << std::endl);
|
"Don't know about test \"" << ttype << "\" yet..."
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -793,23 +805,24 @@ bool cmCTest::OpenOutputFile(const std::string& path, const std::string& name,
|
|||||||
}
|
}
|
||||||
if (cmSystemTools::FileExists(testingDir)) {
|
if (cmSystemTools::FileExists(testingDir)) {
|
||||||
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
if (!cmSystemTools::FileIsDirectory(testingDir)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "File "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< testingDir << " is in the place of the testing directory"
|
"File " << testingDir
|
||||||
<< std::endl);
|
<< " is in the place of the testing directory"
|
||||||
|
<< std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
if (!cmSystemTools::MakeDirectory(testingDir)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Cannot create directory " << testingDir << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string filename = testingDir + "/" + name;
|
std::string filename = testingDir + "/" + name;
|
||||||
stream.Open(filename.c_str());
|
stream.Open(filename.c_str());
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Problem opening file: " << filename << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (compress) {
|
if (compress) {
|
||||||
@@ -1048,9 +1061,10 @@ int cmCTest::RunMakeCommand(const char* command, std::string& output,
|
|||||||
int length;
|
int length;
|
||||||
cmProcessOutput processOutput(encoding);
|
cmProcessOutput processOutput(encoding);
|
||||||
std::string strdata;
|
std::string strdata;
|
||||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Each . represents "
|
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
|
||||||
<< tick_len << " bytes of output" << std::endl
|
" Each . represents " << tick_len << " bytes of output"
|
||||||
<< " " << std::flush);
|
<< std::endl
|
||||||
|
<< " " << std::flush);
|
||||||
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
while (cmsysProcess_WaitForData(cp, &data, &length, nullptr)) {
|
||||||
processOutput.DecodeText(data, length, strdata);
|
processOutput.DecodeText(data, length, strdata);
|
||||||
for (char& cc : 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());
|
ofs << cmCTestLogWrite(strdata.c_str(), strdata.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT, " Size of output: "
|
cmCTestLog(this, HANDLER_PROGRESS_OUTPUT,
|
||||||
<< int(double(output.size()) / 1024.0) << "K" << std::endl);
|
" Size of output: " << int(double(output.size()) / 1024.0) << "K"
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
cmsysProcess_WaitForExit(cp, nullptr);
|
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);
|
"Command exited with the value: " << *retVal << std::endl);
|
||||||
} else if (result == cmsysProcess_State_Exception) {
|
} else if (result == cmsysProcess_State_Exception) {
|
||||||
*retVal = cmsysProcess_GetExitException(cp);
|
*retVal = cmsysProcess_GetExitException(cp);
|
||||||
cmCTestLog(this, WARNING, "There was an exception: " << *retVal
|
cmCTestLog(this, WARNING,
|
||||||
<< std::endl);
|
"There was an exception: " << *retVal << std::endl);
|
||||||
} else if (result == cmsysProcess_State_Expired) {
|
} else if (result == cmsysProcess_State_Expired) {
|
||||||
cmCTestLog(this, WARNING, "There was a timeout" << std::endl);
|
cmCTestLog(this, WARNING, "There was a timeout" << std::endl);
|
||||||
} else if (result == cmsysProcess_State_Error) {
|
} else if (result == cmsysProcess_State_Error) {
|
||||||
output += "\n*** ERROR executing: ";
|
output += "\n*** ERROR executing: ";
|
||||||
output += cmsysProcess_GetErrorString(cp);
|
output += cmsysProcess_GetErrorString(cp);
|
||||||
output += "\n***The build process failed.";
|
output += "\n***The build process failed.";
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "There was an error: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< cmsysProcess_GetErrorString(cp) << std::endl);
|
"There was an error: " << cmsysProcess_GetErrorString(cp)
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
|
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
@@ -1142,7 +1158,8 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
|||||||
if (timeout <= cmDuration::zero()) {
|
if (timeout <= cmDuration::zero()) {
|
||||||
timeout = std::chrono::seconds(1);
|
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()
|
<< (timeout == cmCTest::MaxDuration()
|
||||||
? std::string("infinite")
|
? std::string("infinite")
|
||||||
: std::to_string(cmDurationTo<unsigned int>(timeout)))
|
: 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()) {
|
if (output && tempOutput.begin() != tempOutput.end()) {
|
||||||
output->append(&*tempOutput.begin(), tempOutput.size());
|
output->append(&*tempOutput.begin(), tempOutput.size());
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed"
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< std::endl);
|
"-- Process completed" << std::endl);
|
||||||
|
|
||||||
int result = cmsysProcess_GetState(cp);
|
int result = cmsysProcess_GetState(cp);
|
||||||
|
|
||||||
@@ -1270,16 +1287,18 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output,
|
|||||||
if (output) {
|
if (output) {
|
||||||
*output += outerr;
|
*output += outerr;
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< std::flush);
|
outerr << std::endl
|
||||||
|
<< std::flush);
|
||||||
} else if (result == cmsysProcess_State_Error) {
|
} else if (result == cmsysProcess_State_Error) {
|
||||||
std::string outerr = "\n*** ERROR executing: ";
|
std::string outerr = "\n*** ERROR executing: ";
|
||||||
outerr += cmsysProcess_GetErrorString(cp);
|
outerr += cmsysProcess_GetErrorString(cp);
|
||||||
if (output) {
|
if (output) {
|
||||||
*output += outerr;
|
*output += outerr;
|
||||||
}
|
}
|
||||||
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr << std::endl
|
cmCTestLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
<< std::flush);
|
outerr << std::endl
|
||||||
|
<< std::flush);
|
||||||
}
|
}
|
||||||
cmsysProcess_Delete(cp);
|
cmsysProcess_Delete(cp);
|
||||||
|
|
||||||
@@ -1319,8 +1338,9 @@ std::string cmCTest::SafeBuildIdField(const std::string& value)
|
|||||||
void cmCTest::StartXML(cmXMLWriter& xml, bool append)
|
void cmCTest::StartXML(cmXMLWriter& xml, bool append)
|
||||||
{
|
{
|
||||||
if (this->CurrentTag.empty()) {
|
if (this->CurrentTag.empty()) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Current Tag empty, this may mean"
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
" NightlStartTime was not set correctly."
|
"Current Tag empty, this may mean"
|
||||||
|
" NightlStartTime was not set correctly."
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
cmSystemTools::SetFatalErrorOccured();
|
cmSystemTools::SetFatalErrorOccured();
|
||||||
}
|
}
|
||||||
@@ -1489,8 +1509,9 @@ int cmCTest::GenerateCTestNotesOutput(cmXMLWriter& xml,
|
|||||||
ifs.close();
|
ifs.close();
|
||||||
} else {
|
} else {
|
||||||
xml.Content("Problem reading file: " + file + "\n");
|
xml.Content("Problem reading file: " + file + "\n");
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< file << " while creating notes" << std::endl);
|
"Problem reading file: " << file << " while creating notes"
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
xml.EndElement(); // Text
|
xml.EndElement(); // Text
|
||||||
xml.EndElement(); // Note
|
xml.EndElement(); // Note
|
||||||
@@ -1539,8 +1560,9 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
|
|||||||
|
|
||||||
if (!cmSystemTools::CreateTar(tarFile.c_str(), files,
|
if (!cmSystemTools::CreateTar(tarFile.c_str(), files,
|
||||||
cmSystemTools::TarCompressGZip, false)) {
|
cmSystemTools::TarCompressGZip, false)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Error creating tar while "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
"encoding file: "
|
"Error creating tar while "
|
||||||
|
"encoding file: "
|
||||||
<< file << std::endl);
|
<< file << std::endl);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@@ -1552,11 +1574,12 @@ std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
|
|||||||
std::string cmCTest::Base64EncodeFile(std::string const& file)
|
std::string cmCTest::Base64EncodeFile(std::string const& file)
|
||||||
{
|
{
|
||||||
size_t const len = cmSystemTools::FileLength(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
|
#ifdef _WIN32
|
||||||
| std::ios::binary
|
| std::ios::binary
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
std::vector<char> file_buffer(len + 1);
|
std::vector<char> file_buffer(len + 1);
|
||||||
ifs.read(&file_buffer[0], len);
|
ifs.read(&file_buffer[0], len);
|
||||||
ifs.close();
|
ifs.close();
|
||||||
@@ -1574,8 +1597,9 @@ bool cmCTest::SubmitExtraFiles(const VectorOfStrings& files)
|
|||||||
{
|
{
|
||||||
for (cmsys::String const& file : files) {
|
for (cmsys::String const& file : files) {
|
||||||
if (!cmSystemTools::FileExists(file)) {
|
if (!cmSystemTools::FileExists(file)) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< file << " to submit." << std::endl;);
|
"Cannot find extra file: " << file << " to submit."
|
||||||
|
<< std::endl;);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this->AddSubmitFile(PartExtraFiles, file.c_str());
|
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);
|
"CTest -D called with incorrect option: " << val << std::endl);
|
||||||
|
|
||||||
cmCTestLog(
|
cmCTestLog(
|
||||||
this, ERROR_MESSAGE, "Available options are:"
|
this, ERROR_MESSAGE,
|
||||||
|
"Available options are:"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " ctest -D Continuous" << std::endl
|
<< " ctest -D Continuous" << std::endl
|
||||||
<< " ctest -D Continuous(Start|Update|Configure|Build)" << 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++;
|
i++;
|
||||||
if (!this->SetTest(args[i].c_str(), false)) {
|
if (!this->SetTest(args[i].c_str(), false)) {
|
||||||
success = false;
|
success = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -T called with incorrect option: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< args[i] << std::endl);
|
"CTest -T called with incorrect option: " << args[i]
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
|
<< std::endl);
|
||||||
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"Available options are:"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " " << ctestExec << " -T all" << std::endl
|
<< " " << ctestExec << " -T all" << std::endl
|
||||||
<< " " << ctestExec << " -T start" << std::endl
|
<< " " << ctestExec << " -T start" << std::endl
|
||||||
@@ -2227,9 +2254,11 @@ bool cmCTest::HandleTestModelArgument(const char* ctestExec, size_t& i,
|
|||||||
this->SetTestModel(cmCTest::EXPERIMENTAL);
|
this->SetTestModel(cmCTest::EXPERIMENTAL);
|
||||||
} else {
|
} else {
|
||||||
success = false;
|
success = false;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "CTest -M called with incorrect option: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< str << std::endl);
|
"CTest -M called with incorrect option: " << str
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Available options are:"
|
<< std::endl);
|
||||||
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
|
"Available options are:"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " " << ctestExec << " -M Continuous" << std::endl
|
<< " " << ctestExec << " -M Continuous" << std::endl
|
||||||
<< " " << ctestExec << " -M Experimental" << std::endl
|
<< " " << ctestExec << " -M Experimental" << std::endl
|
||||||
@@ -2270,8 +2299,8 @@ int cmCTest::ExecuteTests()
|
|||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
if (!this->Initialize(cwd.c_str(), nullptr)) {
|
if (!this->Initialize(cwd.c_str(), nullptr)) {
|
||||||
res = 12;
|
res = 12;
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard."
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Problem initializing the dashboard." << std::endl);
|
||||||
} else {
|
} else {
|
||||||
res = this->ProcessSteps();
|
res = this->ProcessSteps();
|
||||||
}
|
}
|
||||||
@@ -2295,8 +2324,8 @@ int cmCTest::RunCMakeAndTest(std::string* output)
|
|||||||
cmDynamicLoader::FlushCache();
|
cmDynamicLoader::FlushCache();
|
||||||
#endif
|
#endif
|
||||||
if (retv != 0) {
|
if (retv != 0) {
|
||||||
cmCTestLog(this, DEBUG, "build and test failing returning: " << retv
|
cmCTestLog(this, DEBUG,
|
||||||
<< std::endl);
|
"build and test failing returning: " << retv << std::endl);
|
||||||
}
|
}
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
@@ -2351,22 +2380,25 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
VectorOfStrings dirs;
|
VectorOfStrings dirs;
|
||||||
VectorOfStrings ndirs;
|
VectorOfStrings ndirs;
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration directory: "
|
cmCTestLog(this, DEBUG,
|
||||||
<< dir << std::endl);
|
"* Read custom CTest configuration directory: " << dir
|
||||||
|
<< std::endl);
|
||||||
|
|
||||||
std::string fname = dir;
|
std::string fname = dir;
|
||||||
fname += "/CTestCustom.cmake";
|
fname += "/CTestCustom.cmake";
|
||||||
cmCTestLog(this, DEBUG, "* Check for file: " << fname << std::endl);
|
cmCTestLog(this, DEBUG, "* Check for file: " << fname << std::endl);
|
||||||
if (cmSystemTools::FileExists(fname)) {
|
if (cmSystemTools::FileExists(fname)) {
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
cmCTestLog(this, DEBUG,
|
||||||
<< fname << std::endl);
|
"* Read custom CTest configuration file: " << fname
|
||||||
|
<< std::endl);
|
||||||
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
bool erroroc = cmSystemTools::GetErrorOccuredFlag();
|
||||||
cmSystemTools::ResetErrorOccuredFlag();
|
cmSystemTools::ResetErrorOccuredFlag();
|
||||||
|
|
||||||
if (!mf->ReadListFile(fname.c_str()) ||
|
if (!mf->ReadListFile(fname.c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag()) {
|
cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Problem reading custom configuration: "
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< fname << std::endl);
|
"Problem reading custom configuration: " << fname
|
||||||
|
<< std::endl);
|
||||||
}
|
}
|
||||||
found = true;
|
found = true;
|
||||||
if (erroroc) {
|
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>& files = gl.GetFiles();
|
||||||
std::vector<std::string>::iterator fileIt;
|
std::vector<std::string>::iterator fileIt;
|
||||||
for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
|
for (fileIt = files.begin(); fileIt != files.end(); ++fileIt) {
|
||||||
cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: "
|
cmCTestLog(this, DEBUG,
|
||||||
<< *fileIt << std::endl);
|
"* Read custom CTest configuration file: " << *fileIt
|
||||||
|
<< std::endl);
|
||||||
if (!mf->ReadListFile(fileIt->c_str()) ||
|
if (!mf->ReadListFile(fileIt->c_str()) ||
|
||||||
cmSystemTools::GetErrorOccuredFlag()) {
|
cmSystemTools::GetErrorOccuredFlag()) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE,
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
@@ -2398,9 +2431,10 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
|
|||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
for (auto& handler : this->TestingHandlers) {
|
for (auto& handler : this->TestingHandlers) {
|
||||||
cmCTestLog(
|
cmCTestLog(this, DEBUG,
|
||||||
this, DEBUG, "* Read custom CTest configuration vectors for handler: "
|
"* Read custom CTest configuration vectors for handler: "
|
||||||
<< handler.first << " (" << handler.second << ")" << std::endl);
|
<< handler.first << " (" << handler.second << ")"
|
||||||
|
<< std::endl);
|
||||||
handler.second->PopulateCustomVectors(mf);
|
handler.second->PopulateCustomVectors(mf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2502,7 +2536,8 @@ void cmCTest::EmptyCTestConfiguration()
|
|||||||
void cmCTest::SetCTestConfiguration(const char* name, const char* value,
|
void cmCTest::SetCTestConfiguration(const char* name, const char* value,
|
||||||
bool suppress)
|
bool suppress)
|
||||||
{
|
{
|
||||||
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:"
|
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT,
|
||||||
|
"SetCTestConfiguration:"
|
||||||
<< name << ":" << (value ? value : "(null)") << "\n",
|
<< name << ":" << (value ? value : "(null)") << "\n",
|
||||||
suppress);
|
suppress);
|
||||||
|
|
||||||
@@ -2889,8 +2924,8 @@ bool cmCTest::CompressString(std::string& str)
|
|||||||
ret = deflate(&strm, Z_FINISH);
|
ret = deflate(&strm, Z_FINISH);
|
||||||
|
|
||||||
if (ret != Z_STREAM_END) {
|
if (ret != Z_STREAM_END) {
|
||||||
cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression."
|
cmCTestLog(this, ERROR_MESSAGE,
|
||||||
<< std::endl);
|
"Error during gzip compression." << std::endl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -566,7 +566,8 @@ void cmCacheManager::AddCacheEntry(const std::string& key, const char* value,
|
|||||||
cmSystemTools::ConvertToUnixSlashes(e.Value);
|
cmSystemTools::ConvertToUnixSlashes(e.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
e.SetProperty("HELPSTRING", helpString
|
e.SetProperty("HELPSTRING",
|
||||||
|
helpString
|
||||||
? helpString
|
? helpString
|
||||||
: "(This variable does not exist and should not be used)");
|
: "(This variable does not exist and should not be used)");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
#define HAVE_COMDEF_H
|
# define HAVE_COMDEF_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Just for this file:
|
// Just for this file:
|
||||||
@@ -16,39 +16,39 @@ static bool LogErrorsAsMessages;
|
|||||||
|
|
||||||
#if defined(HAVE_COMDEF_H)
|
#if defined(HAVE_COMDEF_H)
|
||||||
|
|
||||||
#include <comdef.h>
|
# include <comdef.h>
|
||||||
|
|
||||||
// Copied from a correct comdef.h to avoid problems with deficient versions
|
// Copied from a correct comdef.h to avoid problems with deficient versions
|
||||||
// of comdef.h that exist in the wild... Fixes issue #7533.
|
// of comdef.h that exist in the wild... Fixes issue #7533.
|
||||||
//
|
//
|
||||||
#ifdef _NATIVE_WCHAR_T_DEFINED
|
# ifdef _NATIVE_WCHAR_T_DEFINED
|
||||||
#ifdef _DEBUG
|
# ifdef _DEBUG
|
||||||
#pragma comment(lib, "comsuppwd.lib")
|
# pragma comment(lib, "comsuppwd.lib")
|
||||||
#else
|
# else
|
||||||
#pragma comment(lib, "comsuppw.lib")
|
# pragma comment(lib, "comsuppw.lib")
|
||||||
#endif
|
# endif
|
||||||
#else
|
# else
|
||||||
#ifdef _DEBUG
|
# ifdef _DEBUG
|
||||||
#pragma comment(lib, "comsuppd.lib")
|
# pragma comment(lib, "comsuppd.lib")
|
||||||
#else
|
# else
|
||||||
#pragma comment(lib, "comsupp.lib")
|
# pragma comment(lib, "comsupp.lib")
|
||||||
#endif
|
# endif
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
///! Use ReportHRESULT to make a cmSystemTools::Message after calling
|
///! Use ReportHRESULT to make a cmSystemTools::Message after calling
|
||||||
///! a COM method that may have failed.
|
///! a COM method that may have failed.
|
||||||
#define ReportHRESULT(hr, context) \
|
# define ReportHRESULT(hr, context) \
|
||||||
if (FAILED(hr)) { \
|
if (FAILED(hr)) { \
|
||||||
if (LogErrorsAsMessages) { \
|
if (LogErrorsAsMessages) { \
|
||||||
std::ostringstream _hresult_oss; \
|
std::ostringstream _hresult_oss; \
|
||||||
_hresult_oss.flags(std::ios::hex); \
|
_hresult_oss.flags(std::ios::hex); \
|
||||||
_hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
|
_hresult_oss << context << " failed HRESULT, hr = 0x" << hr \
|
||||||
<< std::endl; \
|
<< std::endl; \
|
||||||
_hresult_oss.flags(std::ios::dec); \
|
_hresult_oss.flags(std::ios::dec); \
|
||||||
_hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
|
_hresult_oss << __FILE__ << "(" << __LINE__ << ")"; \
|
||||||
cmSystemTools::Message(_hresult_oss.str().c_str()); \
|
cmSystemTools::Message(_hresult_oss.str().c_str()); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
///! Using the given instance of Visual Studio, call the named macro
|
///! Using the given instance of Visual Studio, call the named macro
|
||||||
HRESULT InstanceCallMacro(IDispatch* vsIDE, const std::string& macro,
|
HRESULT InstanceCallMacro(IDispatch* vsIDE, const std::string& macro,
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ public:
|
|||||||
/** Is there a keyword which should be skipped in
|
/** Is there a keyword which should be skipped in
|
||||||
the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */
|
the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */
|
||||||
void SetIgnore(const char* ignore) { this->Ignore = ignore; }
|
void SetIgnore(const char* ignore) { this->Ignore = ignore; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::string> Vector;
|
std::vector<std::string> Vector;
|
||||||
unsigned int DataStart;
|
unsigned int DataStart;
|
||||||
@@ -118,6 +119,7 @@ public:
|
|||||||
/// Return the string
|
/// Return the string
|
||||||
const std::string& GetString() const { return this->String; }
|
const std::string& GetString() const { return this->String; }
|
||||||
const char* GetCString() const { return this->String.c_str(); }
|
const char* GetCString() const { return this->String.c_str(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string String;
|
std::string String;
|
||||||
unsigned int DataStart;
|
unsigned int DataStart;
|
||||||
@@ -136,6 +138,7 @@ public:
|
|||||||
|
|
||||||
/// Has it been enabled ?
|
/// Has it been enabled ?
|
||||||
bool IsEnabled() const { return this->Enabled; }
|
bool IsEnabled() const { return this->Enabled; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool Enabled;
|
bool Enabled;
|
||||||
bool DoConsume(const std::string& arg, unsigned int index) override;
|
bool DoConsume(const std::string& arg, unsigned int index) override;
|
||||||
@@ -153,6 +156,7 @@ public:
|
|||||||
|
|
||||||
/// Is it still enabled ?
|
/// Is it still enabled ?
|
||||||
bool IsEnabled() const { return this->Enabled; }
|
bool IsEnabled() const { return this->Enabled; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool Enabled;
|
bool Enabled;
|
||||||
bool DoConsume(const std::string& arg, unsigned int index) override;
|
bool DoConsume(const std::string& arg, unsigned int index) override;
|
||||||
|
|||||||
+51
-44
@@ -81,30 +81,30 @@
|
|||||||
#include "cmWhileCommand.h"
|
#include "cmWhileCommand.h"
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
#include "cmAddCompileOptionsCommand.h"
|
# include "cmAddCompileOptionsCommand.h"
|
||||||
#include "cmAuxSourceDirectoryCommand.h"
|
# include "cmAuxSourceDirectoryCommand.h"
|
||||||
#include "cmBuildNameCommand.h"
|
# include "cmBuildNameCommand.h"
|
||||||
#include "cmCMakeHostSystemInformationCommand.h"
|
# include "cmCMakeHostSystemInformationCommand.h"
|
||||||
#include "cmExportCommand.h"
|
# include "cmExportCommand.h"
|
||||||
#include "cmExportLibraryDependenciesCommand.h"
|
# include "cmExportLibraryDependenciesCommand.h"
|
||||||
#include "cmFLTKWrapUICommand.h"
|
# include "cmFLTKWrapUICommand.h"
|
||||||
#include "cmIncludeExternalMSProjectCommand.h"
|
# include "cmIncludeExternalMSProjectCommand.h"
|
||||||
#include "cmInstallProgramsCommand.h"
|
# include "cmInstallProgramsCommand.h"
|
||||||
#include "cmLinkLibrariesCommand.h"
|
# include "cmLinkLibrariesCommand.h"
|
||||||
#include "cmLoadCacheCommand.h"
|
# include "cmLoadCacheCommand.h"
|
||||||
#include "cmLoadCommandCommand.h"
|
# include "cmLoadCommandCommand.h"
|
||||||
#include "cmOutputRequiredFilesCommand.h"
|
# include "cmOutputRequiredFilesCommand.h"
|
||||||
#include "cmQTWrapCPPCommand.h"
|
# include "cmQTWrapCPPCommand.h"
|
||||||
#include "cmQTWrapUICommand.h"
|
# include "cmQTWrapUICommand.h"
|
||||||
#include "cmRemoveCommand.h"
|
# include "cmRemoveCommand.h"
|
||||||
#include "cmRemoveDefinitionsCommand.h"
|
# include "cmRemoveDefinitionsCommand.h"
|
||||||
#include "cmSourceGroupCommand.h"
|
# include "cmSourceGroupCommand.h"
|
||||||
#include "cmSubdirDependsCommand.h"
|
# include "cmSubdirDependsCommand.h"
|
||||||
#include "cmUseMangledMesaCommand.h"
|
# include "cmUseMangledMesaCommand.h"
|
||||||
#include "cmUtilitySourceCommand.h"
|
# include "cmUtilitySourceCommand.h"
|
||||||
#include "cmVariableRequiresCommand.h"
|
# include "cmVariableRequiresCommand.h"
|
||||||
#include "cmVariableWatchCommand.h"
|
# include "cmVariableWatchCommand.h"
|
||||||
#include "cmWriteFileCommand.h"
|
# include "cmWriteFileCommand.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void GetScriptingCommands(cmState* state)
|
void GetScriptingCommands(cmState* state)
|
||||||
@@ -155,32 +155,39 @@ void GetScriptingCommands(cmState* state)
|
|||||||
state->AddBuiltinCommand("while", new cmWhileCommand);
|
state->AddBuiltinCommand("while", new cmWhileCommand);
|
||||||
|
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"else", "An ELSE command was found outside of a proper "
|
"else",
|
||||||
"IF ENDIF structure. Or its arguments did not match "
|
"An ELSE command was found outside of a proper "
|
||||||
"the opening IF command.");
|
"IF ENDIF structure. Or its arguments did not match "
|
||||||
|
"the opening IF command.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"elseif", "An ELSEIF command was found outside of a proper "
|
"elseif",
|
||||||
"IF ENDIF structure.");
|
"An ELSEIF command was found outside of a proper "
|
||||||
|
"IF ENDIF structure.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"endforeach", "An ENDFOREACH command was found outside of a proper "
|
"endforeach",
|
||||||
"FOREACH ENDFOREACH structure. Or its arguments did "
|
"An ENDFOREACH command was found outside of a proper "
|
||||||
"not match the opening FOREACH command.");
|
"FOREACH ENDFOREACH structure. Or its arguments did "
|
||||||
|
"not match the opening FOREACH command.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"endfunction", "An ENDFUNCTION command was found outside of a proper "
|
"endfunction",
|
||||||
"FUNCTION ENDFUNCTION structure. Or its arguments did not "
|
"An ENDFUNCTION command was found outside of a proper "
|
||||||
"match the opening FUNCTION command.");
|
"FUNCTION ENDFUNCTION structure. Or its arguments did not "
|
||||||
|
"match the opening FUNCTION command.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"endif", "An ENDIF command was found outside of a proper "
|
"endif",
|
||||||
"IF ENDIF structure. Or its arguments did not match "
|
"An ENDIF command was found outside of a proper "
|
||||||
"the opening IF command.");
|
"IF ENDIF structure. Or its arguments did not match "
|
||||||
|
"the opening IF command.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"endmacro", "An ENDMACRO command was found outside of a proper "
|
"endmacro",
|
||||||
"MACRO ENDMACRO structure. Or its arguments did not "
|
"An ENDMACRO command was found outside of a proper "
|
||||||
"match the opening MACRO command.");
|
"MACRO ENDMACRO structure. Or its arguments did not "
|
||||||
|
"match the opening MACRO command.");
|
||||||
state->AddUnexpectedCommand(
|
state->AddUnexpectedCommand(
|
||||||
"endwhile", "An ENDWHILE command was found outside of a proper "
|
"endwhile",
|
||||||
"WHILE ENDWHILE structure. Or its arguments did not "
|
"An ENDWHILE command was found outside of a proper "
|
||||||
"match the opening WHILE command.");
|
"WHILE ENDWHILE structure. Or its arguments did not "
|
||||||
|
"match the opening WHILE command.");
|
||||||
|
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
state->AddBuiltinCommand("cmake_host_system_information",
|
state->AddBuiltinCommand("cmake_host_system_information",
|
||||||
|
|||||||
@@ -149,7 +149,8 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories()
|
|||||||
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
|
cmComputeLinkInformation::ItemVector const& items = cli->GetItems();
|
||||||
for (auto const& item : items) {
|
for (auto const& item : items) {
|
||||||
cmGeneratorTarget const* linkee = item.Target;
|
cmGeneratorTarget const* linkee = item.Target;
|
||||||
if (linkee && !linkee->IsImported()
|
if (linkee &&
|
||||||
|
!linkee->IsImported()
|
||||||
// We can ignore the INTERFACE_LIBRARY items because
|
// We can ignore the INTERFACE_LIBRARY items because
|
||||||
// Target->GetLinkInformation already processed their
|
// Target->GetLinkInformation already processed their
|
||||||
// link interface and they don't have any output themselves.
|
// link interface and they don't have any output themselves.
|
||||||
|
|||||||
@@ -239,8 +239,9 @@ cmComputeLinkDepends::Compute()
|
|||||||
|
|
||||||
// Display the constraint graph.
|
// Display the constraint graph.
|
||||||
if (this->DebugMode) {
|
if (this->DebugMode) {
|
||||||
fprintf(stderr, "---------------------------------------"
|
fprintf(stderr,
|
||||||
"---------------------------------------\n");
|
"---------------------------------------"
|
||||||
|
"---------------------------------------\n");
|
||||||
fprintf(stderr, "Link dependency analysis for target %s, config %s\n",
|
fprintf(stderr, "Link dependency analysis for target %s, config %s\n",
|
||||||
this->Target->GetName().c_str(),
|
this->Target->GetName().c_str(),
|
||||||
this->HasConfig ? this->Config.c_str() : "noconfig");
|
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(
|
cmComputeLinkInformation::cmComputeLinkInformation(
|
||||||
const cmGeneratorTarget* target, const std::string& config)
|
const cmGeneratorTarget* target, const std::string& config)
|
||||||
// Store context information.
|
// Store context information.
|
||||||
: Target(target),
|
: Target(target)
|
||||||
Makefile(target->Target->GetMakefile()),
|
, Makefile(target->Target->GetMakefile())
|
||||||
GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator()),
|
, GlobalGenerator(target->GetLocalGenerator()->GetGlobalGenerator())
|
||||||
CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
|
, CMakeInstance(this->GlobalGenerator->GetCMakeInstance())
|
||||||
// The configuration being linked.
|
// The configuration being linked.
|
||||||
,
|
, Config(config)
|
||||||
Config(config)
|
|
||||||
{
|
{
|
||||||
// Check whether to recognize OpenBSD-style library versioned names.
|
// Check whether to recognize OpenBSD-style library versioned names.
|
||||||
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
this->OpenBSD = this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public:
|
|||||||
std::string GetRPathLinkString() const;
|
std::string GetRPathLinkString() const;
|
||||||
|
|
||||||
std::string GetConfig() const { return this->Config; }
|
std::string GetConfig() const { return this->Config; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AddItem(std::string const& item, const cmGeneratorTarget* tgt);
|
void AddItem(std::string const& item, const cmGeneratorTarget* tgt);
|
||||||
void AddSharedDepItem(std::string const& item, cmGeneratorTarget const* tgt);
|
void AddSharedDepItem(std::string const& item, cmGeneratorTarget const* tgt);
|
||||||
|
|||||||
+17
-11
@@ -82,17 +82,20 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
|||||||
if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) ==
|
if (strcmp(tt, cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE)) ==
|
||||||
0) {
|
0) {
|
||||||
targetType = cmStateEnums::EXECUTABLE;
|
targetType = cmStateEnums::EXECUTABLE;
|
||||||
} else if (strcmp(tt, cmState::GetTargetTypeName(
|
} else if (strcmp(tt,
|
||||||
cmStateEnums::STATIC_LIBRARY)) == 0) {
|
cmState::GetTargetTypeName(
|
||||||
|
cmStateEnums::STATIC_LIBRARY)) == 0) {
|
||||||
targetType = cmStateEnums::STATIC_LIBRARY;
|
targetType = cmStateEnums::STATIC_LIBRARY;
|
||||||
} else {
|
} else {
|
||||||
this->Makefile->IssueMessage(
|
this->Makefile->IssueMessage(
|
||||||
cmake::FATAL_ERROR, std::string("Invalid value '") + tt +
|
cmake::FATAL_ERROR,
|
||||||
|
std::string("Invalid value '") + tt +
|
||||||
"' for "
|
"' for "
|
||||||
"CMAKE_TRY_COMPILE_TARGET_TYPE. Only "
|
"CMAKE_TRY_COMPILE_TARGET_TYPE. Only "
|
||||||
"'" +
|
"'" +
|
||||||
cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) + "' and "
|
cmState::GetTargetTypeName(cmStateEnums::EXECUTABLE) +
|
||||||
"'" +
|
"' and "
|
||||||
|
"'" +
|
||||||
cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) +
|
cmState::GetTargetTypeName(cmStateEnums::STATIC_LIBRARY) +
|
||||||
"' "
|
"' "
|
||||||
"are allowed.");
|
"are allowed.");
|
||||||
@@ -224,8 +227,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
|||||||
cmake::FATAL_ERROR,
|
cmake::FATAL_ERROR,
|
||||||
"Only libraries may be used as try_compile or try_run IMPORTED "
|
"Only libraries may be used as try_compile or try_run IMPORTED "
|
||||||
"LINK_LIBRARIES. Got " +
|
"LINK_LIBRARIES. Got " +
|
||||||
std::string(tgt->GetName()) + " of "
|
std::string(tgt->GetName()) +
|
||||||
"type " +
|
" of "
|
||||||
|
"type " +
|
||||||
cmState::GetTargetTypeName(tgt->GetType()) + ".");
|
cmState::GetTargetTypeName(tgt->GetType()) + ".");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -487,8 +491,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
|||||||
const char* flags = this->Makefile->GetDefinition(langFlags);
|
const char* flags = this->Makefile->GetDefinition(langFlags);
|
||||||
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(),
|
fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li.c_str(),
|
||||||
cmOutputConverter::EscapeForCMake(flags ? flags : "").c_str());
|
cmOutputConverter::EscapeForCMake(flags ? flags : "").c_str());
|
||||||
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
fprintf(fout,
|
||||||
" ${COMPILE_DEFINITIONS}\")\n",
|
"set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
|
||||||
|
" ${COMPILE_DEFINITIONS}\")\n",
|
||||||
li.c_str(), li.c_str());
|
li.c_str(), li.c_str());
|
||||||
}
|
}
|
||||||
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0066)) {
|
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0066)) {
|
||||||
@@ -563,8 +568,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
|
fprintf(fout,
|
||||||
" ${EXE_LINKER_FLAGS}\")\n");
|
"set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}"
|
||||||
|
" ${EXE_LINKER_FLAGS}\")\n");
|
||||||
fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n");
|
fprintf(fout, "include_directories(${INCLUDE_DIRECTORIES})\n");
|
||||||
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
|
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
|
||||||
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");
|
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");
|
||||||
|
|||||||
+9
-9
@@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
|
#if !defined(CMAKE_USE_SYSTEM_CURL) && !defined(_WIN32) && \
|
||||||
!defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
|
!defined(__APPLE__) && !defined(CURL_CA_BUNDLE) && !defined(CURL_CA_PATH)
|
||||||
#define CMAKE_FIND_CAFILE
|
# define CMAKE_FIND_CAFILE
|
||||||
#include "cmSystemTools.h"
|
# include "cmSystemTools.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// curl versions before 7.21.5 did not provide this error code
|
// curl versions before 7.21.5 did not provide this error code
|
||||||
#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
|
#if defined(LIBCURL_VERSION_NUM) && LIBCURL_VERSION_NUM < 0x071505
|
||||||
#define CURLE_NOT_BUILT_IN 4
|
# define CURLE_NOT_BUILT_IN 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define check_curl_result(result, errstr) \
|
#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: ");
|
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||||
}
|
}
|
||||||
#ifdef CMAKE_FIND_CAFILE
|
#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)) {
|
else if (cmSystemTools::FileExists(CMAKE_CAFILE_FEDORA, true)) {
|
||||||
::CURLcode res =
|
::CURLcode res =
|
||||||
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_FEDORA);
|
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_FEDORA);
|
||||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||||
}
|
}
|
||||||
#undef CMAKE_CAFILE_FEDORA
|
# undef CMAKE_CAFILE_FEDORA
|
||||||
else {
|
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)) {
|
if (cmSystemTools::FileExists(CMAKE_CAFILE_COMMON, true)) {
|
||||||
::CURLcode res =
|
::CURLcode res =
|
||||||
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_COMMON);
|
::curl_easy_setopt(curl, CURLOPT_CAINFO, CMAKE_CAFILE_COMMON);
|
||||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
check_curl_result(res, "Unable to set TLS/SSL Verify CAINFO: ");
|
||||||
}
|
}
|
||||||
#undef CMAKE_CAFILE_COMMON
|
# undef CMAKE_CAFILE_COMMON
|
||||||
#define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
|
# define CMAKE_CAPATH_COMMON "/etc/ssl/certs"
|
||||||
if (cmSystemTools::FileIsDirectory(CMAKE_CAPATH_COMMON)) {
|
if (cmSystemTools::FileIsDirectory(CMAKE_CAPATH_COMMON)) {
|
||||||
::CURLcode res =
|
::CURLcode res =
|
||||||
::curl_easy_setopt(curl, CURLOPT_CAPATH, CMAKE_CAPATH_COMMON);
|
::curl_easy_setopt(curl, CURLOPT_CAPATH, CMAKE_CAPATH_COMMON);
|
||||||
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
|
check_curl_result(res, "Unable to set TLS/SSL Verify CAPATH: ");
|
||||||
}
|
}
|
||||||
#undef CMAKE_CAPATH_COMMON
|
# undef CMAKE_CAPATH_COMMON
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return e;
|
return e;
|
||||||
|
|||||||
+21
-20
@@ -13,39 +13,39 @@
|
|||||||
|
|
||||||
// Include the ELF format information system header.
|
// Include the ELF format information system header.
|
||||||
#if defined(__OpenBSD__)
|
#if defined(__OpenBSD__)
|
||||||
#include <elf_abi.h>
|
# include <elf_abi.h>
|
||||||
#include <stdint.h>
|
# include <stdint.h>
|
||||||
#elif defined(__HAIKU__)
|
#elif defined(__HAIKU__)
|
||||||
#include <elf32.h>
|
# include <elf32.h>
|
||||||
#include <elf64.h>
|
# include <elf64.h>
|
||||||
typedef struct Elf32_Ehdr Elf32_Ehdr;
|
typedef struct Elf32_Ehdr Elf32_Ehdr;
|
||||||
typedef struct Elf32_Shdr Elf32_Shdr;
|
typedef struct Elf32_Shdr Elf32_Shdr;
|
||||||
typedef struct Elf32_Sym Elf32_Sym;
|
typedef struct Elf32_Sym Elf32_Sym;
|
||||||
typedef struct Elf32_Rel Elf32_Rel;
|
typedef struct Elf32_Rel Elf32_Rel;
|
||||||
typedef struct Elf32_Rela Elf32_Rela;
|
typedef struct Elf32_Rela Elf32_Rela;
|
||||||
#define ELFMAG0 0x7F
|
# define ELFMAG0 0x7F
|
||||||
#define ELFMAG1 'E'
|
# define ELFMAG1 'E'
|
||||||
#define ELFMAG2 'L'
|
# define ELFMAG2 'L'
|
||||||
#define ELFMAG3 'F'
|
# define ELFMAG3 'F'
|
||||||
#define ET_NONE 0
|
# define ET_NONE 0
|
||||||
#define ET_REL 1
|
# define ET_REL 1
|
||||||
#define ET_EXEC 2
|
# define ET_EXEC 2
|
||||||
#define ET_DYN 3
|
# define ET_DYN 3
|
||||||
#define ET_CORE 4
|
# define ET_CORE 4
|
||||||
#define EM_386 3
|
# define EM_386 3
|
||||||
#define EM_SPARC 2
|
# define EM_SPARC 2
|
||||||
#define EM_PPC 20
|
# define EM_PPC 20
|
||||||
#else
|
#else
|
||||||
#include <elf.h>
|
# include <elf.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(__sun)
|
#if defined(__sun)
|
||||||
#include <sys/link.h> // For dynamic section information
|
# include <sys/link.h> // For dynamic section information
|
||||||
#endif
|
#endif
|
||||||
#ifdef _SCO_DS
|
#ifdef _SCO_DS
|
||||||
#include <link.h> // For DT_SONAME etc.
|
# include <link.h> // For DT_SONAME etc.
|
||||||
#endif
|
#endif
|
||||||
#ifndef DT_RUNPATH
|
#ifndef DT_RUNPATH
|
||||||
#define DT_RUNPATH 29
|
# define DT_RUNPATH 29
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Low-level byte swapping implementation.
|
// Low-level byte swapping implementation.
|
||||||
@@ -162,6 +162,7 @@ public:
|
|||||||
|
|
||||||
// Return the recorded ELF type.
|
// Return the recorded ELF type.
|
||||||
cmELF::FileType GetFileType() const { return this->ELFType; }
|
cmELF::FileType GetFileType() const { return this->ELFType; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Data common to all ELF class implementations.
|
// Data common to all ELF class implementations.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#if !defined(CMAKE_USE_ELF_PARSER)
|
#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
|
#endif
|
||||||
|
|
||||||
class cmELFInternal;
|
class cmELFInternal;
|
||||||
|
|||||||
Loaded 100 of 445 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user