summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx32
-rw-r--r--Source/cmGlobalGenerator.cxx20
-rw-r--r--Source/cmGlobalXCodeGenerator.h54
-rw-r--r--Source/kwsys/SystemInformation.cxx7
-rw-r--r--Source/kwsys/Terminal.c2
6 files changed, 79 insertions, 38 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 3c1e9a4..c443ca8 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 7)
-set(CMake_VERSION_PATCH 20161117)
+set(CMake_VERSION_PATCH 20161118)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 0f27fac..2c31f60 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -329,10 +329,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
}
xml.EndElement(); // TestList
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
- "-- Processing memory checking output: ", this->Quiet);
+ "-- Processing memory checking output:\n", this->Quiet);
size_t total = this->TestResults.size();
- size_t step = total / 10;
- size_t current = 0;
for (cc = 0; cc < this->TestResults.size(); cc++) {
cmCTestTestResult* result = &this->TestResults[cc];
std::string memcheckstr;
@@ -347,18 +345,29 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
static_cast<size_t>(this->CustomMaximumFailedTestOutputSize));
this->WriteTestResultHeader(xml, result);
xml.StartElement("Results");
+ int memoryErrors = 0;
for (std::vector<int>::size_type kk = 0; kk < memcheckresults.size();
++kk) {
if (memcheckresults[kk]) {
xml.StartElement("Defect");
xml.Attribute("type", this->ResultStringsLong[kk]);
xml.Content(memcheckresults[kk]);
+ memoryErrors += memcheckresults[kk];
xml.EndElement(); // Defect
}
this->GlobalResults[kk] += memcheckresults[kk];
}
xml.EndElement(); // Results
-
+ if (memoryErrors > 0) {
+ const int maxTestNameWidth = this->CTest->GetMaxTestNameWidth();
+ std::string outname = result->Name + " ";
+ outname.resize(maxTestNameWidth + 4, '.');
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, cc + 1
+ << "/" << total << " MemCheck: #"
+ << result->TestCount << ": " << outname
+ << " Defects: " << memoryErrors << std::endl,
+ this->Quiet);
+ }
xml.StartElement("Log");
if (this->CTest->ShouldCompressTestOutput()) {
this->CTest->CompressString(memcheckstr);
@@ -369,13 +378,16 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
xml.EndElement(); // Log
this->WriteTestResultFooter(xml, result);
- if (current < cc) {
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, "#" << std::flush,
- this->Quiet);
- current += step;
- }
}
- cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, std::endl, this->Quiet);
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
+ "MemCheck log files can be found here: "
+ "( * corresponds to test number)"
+ << std::endl,
+ this->Quiet);
+ std::string output = this->MemoryTesterOutputFile;
+ cmSystemTools::ReplaceString(output, "??", "*");
+ cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT, output << std::endl,
+ this->Quiet);
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
"Memory checking results:" << std::endl, this->Quiet);
xml.StartElement("DefectList");
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fa447ff..2808051 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -50,6 +50,9 @@
#include <cm_jsoncpp_writer.h>
#endif
+const std::string kCMAKE_PLATFORM_INFO_INITIALIZED =
+ "CMAKE_PLATFORM_INFO_INITIALIZED";
+
class cmInstalledFile;
bool cmTarget::StrictTargetComparison::operator()(cmTarget const* t1,
@@ -428,6 +431,23 @@ void cmGlobalGenerator::EnableLanguage(
// set the dir for parent files so they can be used by modules
mf->AddDefinition("CMAKE_PLATFORM_INFO_DIR", rootBin.c_str());
+ if (!this->CMakeInstance->GetIsInTryCompile()) {
+ // Keep a mark in the cache to indicate that we've initialized the
+ // platform information directory. If the platform information
+ // directory exists but the mark is missing then CMakeCache.txt
+ // has been removed or replaced without also removing the CMakeFiles/
+ // directory. In this case remove the platform information directory
+ // so that it will be re-initialized and the relevant information
+ // restored in the cache.
+ if (cmSystemTools::FileIsDirectory(rootBin) &&
+ !mf->IsOn(kCMAKE_PLATFORM_INFO_INITIALIZED)) {
+ cmSystemTools::RemoveADirectory(rootBin);
+ }
+ this->GetCMakeInstance()->AddCacheEntry(
+ kCMAKE_PLATFORM_INFO_INITIALIZED, "1",
+ "Platform information initialized", cmStateEnums::INTERNAL);
+ }
+
// find and make sure CMAKE_MAKE_PROGRAM is defined
if (!this->FindMakeProgram(mf)) {
return;
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ded8073..98625d1 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -23,7 +23,7 @@ public:
static cmGlobalGeneratorFactory* NewFactory();
///! Get the name for the generator.
- virtual std::string GetName() const
+ std::string GetName() const CM_OVERRIDE
{
return cmGlobalXCodeGenerator::GetActualName();
}
@@ -33,51 +33,53 @@ public:
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
- virtual cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf);
+ cmLocalGenerator* CreateLocalGenerator(cmMakefile* mf) CM_OVERRIDE;
/**
* Try to determine system information such as shared library
* extension, pthreads, byte order etc.
*/
- virtual void EnableLanguage(std::vector<std::string> const& languages,
- cmMakefile*, bool optional);
+ void EnableLanguage(std::vector<std::string> const& languages, cmMakefile*,
+ bool optional) CM_OVERRIDE;
/**
* Try running cmake and building a file. This is used for dynalically
* loaded commands, not as part of the usual build process.
*/
- virtual void GenerateBuildCommand(
- std::vector<std::string>& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- bool verbose,
- std::vector<std::string> const& makeOptions = std::vector<std::string>());
+ void GenerateBuildCommand(std::vector<std::string>& makeCommand,
+ const std::string& makeProgram,
+ const std::string& projectName,
+ const std::string& projectDir,
+ const std::string& targetName,
+ const std::string& config, bool fast, bool verbose,
+ std::vector<std::string> const& makeOptions =
+ std::vector<std::string>()) CM_OVERRIDE;
/** Append the subdirectory for the given configuration. */
- virtual void AppendDirectoryForConfig(const std::string& prefix,
- const std::string& config,
- const std::string& suffix,
- std::string& dir);
+ void AppendDirectoryForConfig(const std::string& prefix,
+ const std::string& config,
+ const std::string& suffix,
+ std::string& dir) CM_OVERRIDE;
bool FindMakeProgram(cmMakefile*) CM_OVERRIDE;
///! What is the configurations directory variable called?
- virtual const char* GetCMakeCFGIntDir() const;
+ const char* GetCMakeCFGIntDir() const CM_OVERRIDE;
///! expand CFGIntDir
- virtual std::string ExpandCFGIntDir(const std::string& str,
- const std::string& config) const;
+ std::string ExpandCFGIntDir(const std::string& str,
+ const std::string& config) const CM_OVERRIDE;
void SetCurrentLocalGenerator(cmLocalGenerator*);
/** Return true if the generated build tree may contain multiple builds.
i.e. "Can I build Debug and Release in the same tree?" */
- virtual bool IsMultiConfig() const;
+ bool IsMultiConfig() const CM_OVERRIDE;
- virtual bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf);
+ bool SetGeneratorToolset(std::string const& ts, cmMakefile* mf) CM_OVERRIDE;
void AppendFlag(std::string& flags, std::string const& flag);
protected:
- virtual void AddExtraIDETargets();
- virtual void Generate();
+ void AddExtraIDETargets() CM_OVERRIDE;
+ void Generate() CM_OVERRIDE;
private:
cmXCodeObject* CreateOrGetPBXGroup(cmGeneratorTarget* gtgt,
@@ -120,7 +122,7 @@ private:
cmXCodeObject* CreateFlatClone(cmXCodeObject*);
cmXCodeObject* CreateXCodeTarget(cmGeneratorTarget* gtgt,
cmXCodeObject* buildPhases);
- void ForceLinkerLanguages();
+ void ForceLinkerLanguages() CM_OVERRIDE;
void ForceLinkerLanguage(cmGeneratorTarget* gtgt);
const char* GetTargetLinkFlagsVar(const cmGeneratorTarget* target) const;
const char* GetTargetFileType(cmGeneratorTarget* target);
@@ -192,11 +194,11 @@ private:
std::vector<std::string> const& defines,
bool dflag = false);
- void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const;
+ void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const CM_OVERRIDE;
protected:
- virtual const char* GetInstallTargetName() const { return "install"; }
- virtual const char* GetPackageTargetName() const { return "package"; }
+ const char* GetInstallTargetName() const CM_OVERRIDE { return "install"; }
+ const char* GetPackageTargetName() const CM_OVERRIDE { return "package"; }
unsigned int XcodeVersion;
std::string VersionString;
@@ -211,7 +213,7 @@ private:
bool XcodeBuildCommandInitialized;
void PrintCompilerAdvice(std::ostream&, std::string const&,
- const char*) const
+ const char*) const CM_OVERRIDE
{
}
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 1675da5..e01dcd7 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -79,6 +79,7 @@ typedef int siginfo_t;
#include <sys/sysctl.h>
#if defined(KWSYS_SYS_HAS_IFADDRS_H)
#include <ifaddrs.h>
+#include <net/if.h>
#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
#endif
#endif
@@ -99,6 +100,7 @@ typedef int siginfo_t;
#include <sys/sysctl.h>
#if defined(KWSYS_SYS_HAS_IFADDRS_H)
#include <ifaddrs.h>
+#include <net/if.h>
#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
#endif
#if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ - 0 >= 1050)
@@ -113,6 +115,7 @@ typedef int siginfo_t;
#include <sys/socket.h>
#if defined(KWSYS_SYS_HAS_IFADDRS_H)
#include <ifaddrs.h>
+#include <net/if.h>
#if !defined(__LSB_VERSION__) /* LSB has no getifaddrs */
#define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
#endif
@@ -1696,7 +1699,9 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
for (ifa = ifas; ifa != NULL; ifa = ifa->ifa_next) {
int fam = ifa->ifa_addr ? ifa->ifa_addr->sa_family : -1;
- if ((fam == AF_INET) || (fam == AF_INET6)) {
+ // Skip Loopback interfaces
+ if (((fam == AF_INET) || (fam == AF_INET6)) &&
+ !(ifa->ifa_flags & IFF_LOOPBACK)) {
char host[NI_MAXHOST] = { '\0' };
const size_t addrlen = (fam == AF_INET ? sizeof(struct sockaddr_in)
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c
index 26174a1..c0b7f45 100644
--- a/Source/kwsys/Terminal.c
+++ b/Source/kwsys/Terminal.c
@@ -150,6 +150,8 @@ static const char* kwsysTerminalVT100Names[] = { "Eterm",
"screen-bce",
"screen-w",
"screen.linux",
+ "tmux",
+ "tmux-256color",
"vt100",
"xterm",
"xterm-16color",