Commit 32233300 authored by Bill Hoffman's avatar Bill Hoffman
Browse files

ENH: merge in changes from main tree

parent cc76f9be
......@@ -7,7 +7,7 @@ SET(CMake_VERSION_MAJOR 2)
SET(CMake_VERSION_MINOR 4)
SET(CMake_VERSION_PATCH 7)
# for an actual release this should not be defined
SET(CMake_VERSION_RC 5)
SET(CMake_VERSION_RC 6)
SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
......
Changes in CMake 2.4.7
--- RC 6 ---
* Fix stack reporting bug in macros and include
* Fix double quote in -D flags for vs broken in RC 5
* Fix problem with newer curl and curl_getdate changes
* Do not emit link paths /usr/lib32 and /usr/lib64 with -L
---RC 5 ----
* Fix for bug# 4423, LANGUAGE property now works in VS IDE
* Fix for RUN_TESTS running the tests twice in VS IDE
......
......@@ -225,15 +225,18 @@ int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName,
int cmCPackTarCompress_Compress_Output(void* client_data,
const char* data, int data_length)
{
if(!client_data)
{
return 0;
}
cmcompress_stream *cstream = static_cast<cmcompress_stream*>(client_data);
cmCPackTarCompress_Data *mydata
= static_cast<cmCPackTarCompress_Data*>(cstream->client_data);
mydata->OutputStream->write(data, data_length);
if ( !mydata->OutputStream )
{
return 0;
}
mydata->OutputStream->write(data, data_length);
return data_length;
}
......
......@@ -57,6 +57,12 @@ struct tm* cmCTest::GetNightlyTime(std::string str,
{
struct tm* lctime;
time_t tctime = time(0);
lctime = gmtime(&tctime);
char buf[1024];
// add todays year day and month to the time in str because
// curl_getdate no longer assumes the day is today
sprintf(buf, "%d%02d%02d %s", lctime->tm_year+1900, lctime->tm_mday,
lctime->tm_mon, str.c_str());
cmCTestLog(this, OUTPUT, "Determine Nightly Start Time" << std::endl
<< " Specified time: " << str.c_str() << std::endl);
//Convert the nightly start time to seconds. Since we are
......
......@@ -99,6 +99,11 @@ public:
" COMMAND1(ARGS ...)\n"
" COMMAND2(ARGS ...)\n"
" ...\n"
" ELSEIF(expression2)\n"
" # ELSEIF section.\n"
" COMMAND1(ARGS ...)\n"
" COMMAND2(ARGS ...)\n"
" ...\n"
" ELSE(expression)\n"
" # ELSE section.\n"
" COMMAND1(ARGS ...)\n"
......@@ -107,8 +112,9 @@ public:
" ENDIF(expression)\n"
"Evaluates the given expression. If the result is true, the commands "
"in the THEN section are invoked. Otherwise, the commands in the "
"ELSE section are invoked. The ELSE section is optional. Note that "
"the same expression must be given to IF, ELSE, and ENDIF. Long "
"ELSE section are invoked. The ELSEIF and ELSE sections are "
"optional. You may have multiple ELSEIF clauses. Note that "
"the same expression must be given to IF, and ENDIF. Long "
"expressions can be used and the order or precedence is that the "
"EXISTS, COMMAND, and DEFINED operators will be evaluated first. "
"Then any EQUAL, LESS, GREATER, STRLESS, STRGREATER, STREQUAL, MATCHES "
......
......@@ -28,7 +28,7 @@
struct cmListFileArgument
{
cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {}
cmListFileArgument(): Value(), Quoted(false), FilePath(), Line(0) {}
cmListFileArgument(const cmListFileArgument& r):
Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {}
cmListFileArgument(const std::string& v, bool q, const char* file,
......@@ -44,7 +44,7 @@ struct cmListFileArgument
}
std::string Value;
bool Quoted;
const char* FilePath;
std::string FilePath;
long Line;
};
......
......@@ -1467,6 +1467,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
// Some search paths should never be emitted
emitted.insert("");
emitted.insert("/usr/lib");
emitted.insert("/usr/lib32");
emitted.insert("/usr/lib64");
std::string libPathFlag =
this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
std::string libLinkFlag =
......
......@@ -544,9 +544,9 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"));
// Add a definition for the configuration name.
std::string configDefine = "CMAKE_INTDIR=\\\"";
std::string configDefine = "CMAKE_INTDIR=\"";
configDefine += configName;
configDefine += "\\\"";
configDefine += "\"";
targetOptions.AddDefine(configDefine);
// Add a definition for the export macro.
......@@ -1872,14 +1872,13 @@ cmLocalVisualStudio7GeneratorOptions
for(std::vector<cmStdString>::const_iterator di = this->Defines.begin();
di != this->Defines.end(); ++di)
{
// Escape this flag for the IDE.
std::string define =
cmLocalVisualStudio7GeneratorEscapeForXML(di->c_str());
// Old comment:
// Double-quotes in the value of the definition must be escaped
// with a backslash. The entire definition should be quoted in
// the generated xml attribute to avoid confusing the VS parser.
// with a backslash.
std::string define = di->c_str();
cmSystemTools::ReplaceString(define, "\"", "\\\"");
// Escape this flag for the IDE.
define = cmLocalVisualStudio7GeneratorEscapeForXML(define.c_str());
// Write this flag. Quote it if the definition is not
// alphanumeric.
......
......@@ -461,7 +461,9 @@ bool cmMakefile::ReadListFile(const char* filename_in,
cmListFile cacheFile;
if( !cacheFile.ParseFile(filenametoread, requireProjectCommand) )
{
this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentFile.c_str());
// pop the listfile off the stack
this->ListFileStack.pop_back();
this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str());
return false;
}
// add this list file to the list of dependencies
......@@ -1900,7 +1902,7 @@ void cmMakefile::ExpandArguments(
// Expand the variables in the argument.
value = i->Value;
this->ExpandVariablesInString(value, false, false, false,
i->FilePath, i->Line,
i->FilePath.c_str(), i->Line,
false, true);
// If the argument is quoted, it should be one argument.
......@@ -2706,15 +2708,18 @@ std::vector<cmTest*> *cmMakefile::GetTests()
std::string cmMakefile::GetListFileStack()
{
std::string tmp;
for (std::deque<cmStdString>::iterator i = this->ListFileStack.begin();
i != this->ListFileStack.end(); ++i)
cmOStringStream tmp;
size_t depth = this->ListFileStack.size();
std::deque<cmStdString>::iterator it = this->ListFileStack.end();
do
{
if (i != this->ListFileStack.begin())
{
tmp += ";";
}
tmp += *i;
--it;
tmp << "\n[";
tmp << depth;
tmp << "]\t";
tmp << *it;
depth--;
}
return tmp;
while (it != this->ListFileStack.begin());
return tmp.str();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment