summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx29
-rw-r--r--Source/CTest/cmCTestTestHandler.h5
-rw-r--r--Source/cmCTest.cxx41
-rw-r--r--Source/cmGeneratorTarget.cxx12
-rw-r--r--Source/cmGlobalGenerator.cxx5
-rw-r--r--Source/cmGlobalGenerator.h3
-rw-r--r--Source/cmLocalGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
-rw-r--r--Source/cmSystemTools.cxx14
-rw-r--r--Source/cmSystemTools.h1
-rw-r--r--Source/cmTarget.cxx4
-rw-r--r--Source/ctest.cxx4
13 files changed, 99 insertions, 25 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e6f60f1..e43b424 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 3)
-set(CMake_VERSION_PATCH 20150918)
+set(CMake_VERSION_PATCH 20150922)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 9402689..5cdab52 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -524,21 +524,24 @@ int cmCPackDebGenerator::createDeb()
packageFiles.begin();
fileIt != packageFiles.end(); ++ fileIt )
{
- std::string cmd = "\"";
- cmd += cmSystemTools::GetCMakeCommand();
- cmd += "\" -E md5sum \"";
- cmd += *fileIt;
- cmd += "\"";
-
- std::string output;
- int retval = -1;
- int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, &output,
- &retval, toplevel.c_str(), this->GeneratorVerbose, 0);
- if ( !res || retval )
+ // hash only regular files
+ if( cmSystemTools::FileIsDirectory(*fileIt)
+ || cmSystemTools::FileIsSymlink(*fileIt))
{
- cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running cmake -E md5sum "
- << cmd << std::endl);
+ continue;
}
+
+ char md5sum[33];
+ if(!cmSystemTools::ComputeFileMD5(*fileIt, md5sum))
+ {
+ cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of "
+ << *fileIt << std::endl);
+ }
+
+ md5sum[32] = 0;
+
+ std::string output(md5sum);
+ output += " " + *fileIt + "\n";
// debian md5sums entries are like this:
// 014f3604694729f3bf19263bac599765 usr/bin/ccmake
// thus strip the full path (with the trailing slash)
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 14067d5..c635430 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -65,6 +65,11 @@ public:
void SetMaxIndex(int n) {this->MaxIndex = n;}
int GetMaxIndex() {return this->MaxIndex;}
+ void SetTestOutputSizePassed(int n)
+ { this->CustomMaximumPassedTestOutputSize = n; }
+ void SetTestOutputSizeFailed(int n)
+ { this->CustomMaximumFailedTestOutputSize = n; }
+
///! pass the -I argument down
void SetTestsToRunInformation(const char*);
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index b2ad4a8..6e55d89 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2165,7 +2165,46 @@ bool cmCTest::HandleCommandLineArguments(size_t &i,
{
this->OutputTestOutputOnTestFailure = true;
}
-
+ if (this->CheckArgument(arg, "--test-output-size-passed") &&
+ i < args.size() - 1)
+ {
+ i++;
+ long outputSize;
+ if (cmSystemTools::StringToLong(args[i].c_str(), &outputSize))
+ {
+ if (cmCTestTestHandler *pCTestTestHandler =
+ static_cast<cmCTestTestHandler*>(this->TestingHandlers["test"]))
+ {
+ pCTestTestHandler->SetTestOutputSizePassed(int(outputSize));
+ }
+ }
+ else
+ {
+ cmCTestLog(this, WARNING,
+ "Invalid value for '--test-output-size-passed': " <<
+ args[i] << "\n");
+ }
+ }
+ if (this->CheckArgument(arg, "--test-output-size-failed") &&
+ i < args.size() - 1)
+ {
+ i++;
+ long outputSize;
+ if (cmSystemTools::StringToLong(args[i].c_str(), &outputSize))
+ {
+ if (cmCTestTestHandler *pCTestTestHandler =
+ static_cast<cmCTestTestHandler*>(this->TestingHandlers["test"]))
+ {
+ pCTestTestHandler->SetTestOutputSizeFailed(int(outputSize));
+ }
+ }
+ else
+ {
+ cmCTestLog(this, WARNING,
+ "Invalid value for '--test-output-size-failed': " <<
+ args[i] << "\n");
+ }
+ }
if(this->CheckArgument(arg, "-N", "--show-only"))
{
this->ShowOnly = true;
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index fb5805b..555c437 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -2218,7 +2218,7 @@ cmGeneratorTarget::GetIncludeDirectories(const std::string& config,
"INCLUDE_DIRECTORIES")
!= debugProperties.end();
- if (this->Makefile->IsConfigured())
+ if (this->GlobalGenerator->GetConfigureDoneCMP0026())
{
this->DebugIncludesDone = true;
}
@@ -2365,7 +2365,7 @@ void cmGeneratorTarget::GetCompileOptions(std::vector<std::string> &result,
"COMPILE_OPTIONS")
!= debugProperties.end();
- if (this->Makefile->IsConfigured())
+ if (this->GlobalGenerator->GetConfigureDoneCMP0026())
{
this->DebugCompileOptionsDone = true;
}
@@ -2435,7 +2435,7 @@ void cmGeneratorTarget::GetCompileFeatures(std::vector<std::string> &result,
"COMPILE_FEATURES")
!= debugProperties.end();
- if (this->Makefile->IsConfigured())
+ if (this->GlobalGenerator->GetConfigureDoneCMP0026())
{
this->DebugCompileFeaturesDone = true;
}
@@ -2503,7 +2503,7 @@ void cmGeneratorTarget::GetCompileDefinitions(std::vector<std::string> &list,
"COMPILE_DEFINITIONS")
!= debugProperties.end();
- if (this->Makefile->IsConfigured())
+ if (this->GlobalGenerator->GetConfigureDoneCMP0026())
{
this->DebugCompileDefinitionsDone = true;
}
@@ -3937,7 +3937,7 @@ cmGeneratorTarget::ReportPropertyOrigin(const std::string &p,
p)
!= debugProperties.end();
- if (this->Target->GetMakefile()->IsConfigured())
+ if (this->GlobalGenerator->GetConfigureDoneCMP0026())
{
this->DebugCompatiblePropertiesDone[p] = true;
}
@@ -4504,7 +4504,7 @@ void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
std::vector<cmGeneratorTarget*> objectLibraries;
std::vector<cmSourceFile const*> externalObjects;
- if (!this->Makefile->IsConfigured())
+ if (!this->GlobalGenerator->GetConfigureDoneCMP0026())
{
std::vector<cmTarget*> objectTargets;
this->Target->GetObjectLibrariesCMP0026(objectTargets);
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 33b04ac..7aa8bb6 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -72,6 +72,8 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
this->ExtraGenerator = 0;
this->CurrentMakefile = 0;
this->TryCompileOuterMakefile = 0;
+
+ this->ConfigureDoneCMP0026 = false;
}
cmGlobalGenerator::~cmGlobalGenerator()
@@ -1110,9 +1112,12 @@ void cmGlobalGenerator::Configure()
this->CMakeInstance->GetHomeOutputDirectory());
// now do it
+ this->ConfigureDoneCMP0026 = false;
dirMf->Configure();
dirMf->EnforceDirectoryLevelRules();
+ this->ConfigureDoneCMP0026 = true;
+
// Put a copy of each global target in every directory.
cmTargets globalTargets;
this->CreateDefaultGlobalTargets(&globalTargets);
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 9fc2d45..40f98dc 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -363,6 +363,8 @@ public:
cmFileLockPool& GetFileLockPool() { return FileLockPool; }
#endif
+ bool GetConfigureDoneCMP0026() const { return this->ConfigureDoneCMP0026; }
+
std::string MakeSilentFlag;
protected:
typedef std::vector<cmLocalGenerator*> GeneratorVector;
@@ -520,6 +522,7 @@ protected:
bool ForceUnixPaths;
bool ToolSupportsColor;
bool InstallTargetEnabled;
+ bool ConfigureDoneCMP0026;
};
#endif
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 97a9f1e..4418ead 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2850,7 +2850,7 @@ cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
}
}
this->BackwardsCompatibility = CMake_VERSION_ENCODE(major, minor, patch);
- this->BackwardsCompatibilityFinal = this->Makefile->IsConfigured();
+ this->BackwardsCompatibilityFinal = true;
}
return this->BackwardsCompatibility;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 752c8a7..f46c5b9 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -371,7 +371,7 @@ cmNinjaTargetGenerator
mf->GetSafeDefinition("CMAKE_C_COMPILER") :
mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
cldeps = "\"";
- cldeps += mf->GetSafeDefinition("CMAKE_CMCLDEPS_EXECUTABLE");
+ cldeps += cmSystemTools::GetCMClDepsCommand();
cldeps += "\" " + lang + " $in \"$DEP_FILE\" $out \"";
cldeps += mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX");
cldeps += "\" \"" + cl + "\" ";
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 005a803..2675066 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2216,6 +2216,7 @@ static std::string cmSystemToolsCTestCommand;
static std::string cmSystemToolsCPackCommand;
static std::string cmSystemToolsCMakeCursesCommand;
static std::string cmSystemToolsCMakeGUICommand;
+static std::string cmSystemToolsCMClDepsCommand;
static std::string cmSystemToolsCMakeRoot;
void cmSystemTools::FindCMakeResources(const char* argv0)
{
@@ -2308,6 +2309,13 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
{
cmSystemToolsCMakeCursesCommand = "";
}
+ cmSystemToolsCMClDepsCommand = exe_dir;
+ cmSystemToolsCMClDepsCommand += "/cmcldeps";
+ cmSystemToolsCMClDepsCommand += cmSystemTools::GetExecutableExtension();
+ if(!cmSystemTools::FileExists(cmSystemToolsCMClDepsCommand.c_str()))
+ {
+ cmSystemToolsCMClDepsCommand = "";
+ }
#ifdef CMAKE_BUILD_WITH_CMAKE
// Install tree has "<prefix>/bin/cmake" and "<prefix><CMAKE_DATA_DIR>".
@@ -2375,6 +2383,12 @@ std::string const& cmSystemTools::GetCMakeGUICommand()
}
//----------------------------------------------------------------------------
+std::string const& cmSystemTools::GetCMClDepsCommand()
+{
+ return cmSystemToolsCMClDepsCommand;
+}
+
+//----------------------------------------------------------------------------
std::string const& cmSystemTools::GetCMakeRoot()
{
return cmSystemToolsCMakeRoot;
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index d14897f..e88170a 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -426,6 +426,7 @@ public:
static std::string const& GetCMakeCommand();
static std::string const& GetCMakeGUICommand();
static std::string const& GetCMakeCursesCommand();
+ static std::string const& GetCMClDepsCommand();
static std::string const& GetCMakeRoot();
/** Echo a message in color using KWSys's Terminal cprintf. */
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 2dfa19c..13e0d7e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -636,7 +636,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
{
assert(this->GetType() != INTERFACE_LIBRARY);
- if (!this->Makefile->IsConfigured())
+ if (!this->GetMakefile()->GetGlobalGenerator()->GetConfigureDoneCMP0026())
{
// At configure-time, this method can be called as part of getting the
// LOCATION property or to export() a file to be include()d. However
@@ -682,7 +682,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
"SOURCES")
!= debugProperties.end();
- if (this->Makefile->IsConfigured())
+ if (this->GetMakefile()->GetGlobalGenerator()->GetConfigureDoneCMP0026())
{
this->DebugSourcesDone = true;
}
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index afcbd61..7fa6aed 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -46,6 +46,10 @@ static const char * cmDocumentationOptions[][2] =
{"--debug", "Displaying more verbose internals of CTest."},
{"--output-on-failure", "Output anything outputted by the test program "
"if the test should fail."},
+ {"--test-output-size-passed <size>", "Limit the output for passed tests "
+ "to <size> bytes"},
+ {"--test-output-size-failed <size>", "Limit the output for failed tests "
+ "to <size> bytes"},
{"-F", "Enable failover."},
{"-j <jobs>, --parallel <jobs>", "Run the tests in parallel using the "
"given number of jobs."},