summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/CTest/cmCTestBuildCommand.cxx9
-rw-r--r--Source/QtDialog/CMake.desktop2
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx2
-rw-r--r--Source/cmAddCustomTargetCommand.cxx6
-rw-r--r--Source/cmAddExecutableCommand.cxx6
-rw-r--r--Source/cmAddLibraryCommand.cxx11
-rw-r--r--Source/cmArchiveWrite.cxx35
-rw-r--r--Source/cmCacheManager.cxx6
-rw-r--r--Source/cmComputeTargetDepends.cxx7
-rw-r--r--Source/cmDependsFortran.cxx41
-rw-r--r--Source/cmDocumentation.cxx16
-rw-r--r--Source/cmDocumentation.h1
-rw-r--r--Source/cmDocumentationFormatter.h2
-rw-r--r--Source/cmGetPropertyCommand.cxx3
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx2
-rw-r--r--Source/cmGlobalGenerator.cxx6
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx9
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx28
-rw-r--r--Source/cmGlobalXCodeGenerator.h1
-rw-r--r--Source/cmIncludeCommand.cxx6
-rw-r--r--Source/cmInstallTargetGenerator.cxx14
-rw-r--r--Source/cmMakefile.cxx22
-rw-r--r--Source/cmMakefile.h2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx6
-rw-r--r--Source/cmOSXBundleGenerator.cxx2
-rw-r--r--Source/cmSystemTools.cxx13
-rw-r--r--Source/cmTarget.cxx58
-rw-r--r--Source/cmTarget.h4
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx14
-rw-r--r--Source/cmVS10LinkFlagTable.h5
-rw-r--r--Source/cmVS11LinkFlagTable.h5
-rw-r--r--Source/cmVS12LinkFlagTable.h5
-rw-r--r--Source/cmake.cxx31
-rw-r--r--Source/ctest.cxx3
-rw-r--r--Source/kwsys/ProcessUNIX.c6
-rw-r--r--Source/kwsys/SystemInformation.cxx48
-rw-r--r--Source/kwsys/SystemTools.cxx7
38 files changed, 285 insertions, 163 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index b61fe08..4caa608 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 0)
-set(CMake_VERSION_PATCH 0)
-set(CMake_VERSION_RC 2)
+set(CMake_VERSION_PATCH 1)
+#set(CMake_VERSION_RC 0)
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 12ff718..b250fc3 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -113,6 +113,15 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
this->GlobalGenerator =
this->Makefile->GetCMakeInstance()->CreateGlobalGenerator(
cmakeGeneratorName);
+ if(!this->GlobalGenerator)
+ {
+ std::string e = "could not create generator named \"";
+ e += cmakeGeneratorName;
+ e += "\"";
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
+ cmSystemTools::SetFatalErrorOccured();
+ return 0;
+ }
}
if(strlen(cmakeBuildConfiguration) == 0)
{
diff --git a/Source/QtDialog/CMake.desktop b/Source/QtDialog/CMake.desktop
index 645eb76..7be495f 100644
--- a/Source/QtDialog/CMake.desktop
+++ b/Source/QtDialog/CMake.desktop
@@ -3,7 +3,7 @@ Version=1.0
Name=CMake
Comment=Cross-platform buildsystem
Exec=cmake-gui %f
-Icon=CMakeSetup32.png
+Icon=CMakeSetup32
Terminal=false
X-MultipleArgs=false
Type=Application
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index f62afd6..10879c0 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -812,7 +812,7 @@ void CMakeSetupDialog::doAbout()
{
QString msg = tr(
"CMake %1 (cmake.org).\n"
- "CMake suite maintained by Kitware, Inc. (kitware.com).\n"
+ "CMake suite maintained and supported by Kitware (kitware.com/cmake).\n"
"Distributed under terms of the BSD 3-Clause License.\n"
"\n"
"CMake GUI maintained by csimsoft,\n"
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index ef62523..e27d830 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -165,10 +165,13 @@ bool cmAddCustomTargetCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -180,9 +183,6 @@ bool cmAddCustomTargetCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << targetName <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index 62b6667..3f9400e 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -79,10 +79,13 @@ bool cmAddExecutableCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -94,9 +97,6 @@ bool cmAddExecutableCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << exename <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 009b1ca..e62a40e 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -214,11 +214,17 @@ bool cmAddLibraryCommand
if (!nameOk)
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
+ cmOStringStream e;
bool issueMessage = false;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0037))
{
case cmPolicies::WARN:
- issueMessage = type != cmTarget::INTERFACE_LIBRARY;
+ if(type != cmTarget::INTERFACE_LIBRARY)
+ {
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
+ issueMessage = true;
+ }
case cmPolicies::OLD:
break;
case cmPolicies::NEW:
@@ -229,9 +235,6 @@ bool cmAddLibraryCommand
}
if (issueMessage)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0037)) << "\n";
e << "The target name \"" << libName <<
"\" is reserved or not valid for certain "
"CMake features, such as generator expressions, and may result "
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index d5dcd6a..58f7573 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -18,6 +18,13 @@
#include <cm_libarchive.h>
//----------------------------------------------------------------------------
+static std::string cm_archive_error_string(struct archive* a)
+{
+ const char* e = archive_error_string(a);
+ return e? e : "unknown error";
+}
+
+//----------------------------------------------------------------------------
class cmArchiveWrite::Entry
{
struct archive_entry* Object;
@@ -60,7 +67,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_none(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_none: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -68,7 +75,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_compress(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_compress: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -76,7 +83,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_gzip(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_gzip: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -84,7 +91,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_bzip2(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_bzip2: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -92,7 +99,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_lzma(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_lzma: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -100,7 +107,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_compression_xz(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_compression_xz: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -109,7 +116,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if (archive_read_disk_set_standard_lookup(this->Disk) != ARCHIVE_OK)
{
this->Error = "archive_read_disk_set_standard_lookup: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;;
}
#endif
@@ -119,7 +126,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_format_zip(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_format_zip: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -127,7 +134,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if(archive_write_set_format_pax_restricted(this->Archive) != ARCHIVE_OK)
{
this->Error = "archive_write_set_format_pax_restricted: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
break;
@@ -137,7 +144,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
if (archive_write_set_bytes_in_last_block(this->Archive, 1))
{
this->Error = "archive_write_set_bytes_in_last_block: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
@@ -147,7 +154,7 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
0) != ARCHIVE_OK)
{
this->Error = "archive_write_open: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return;
}
}
@@ -235,7 +242,7 @@ bool cmArchiveWrite::AddFile(const char* file,
if(archive_read_disk_entry_from_file(this->Disk, e, -1, 0) != ARCHIVE_OK)
{
this->Error = "archive_read_disk_entry_from_file: ";
- this->Error += archive_error_string(this->Disk);
+ this->Error += cm_archive_error_string(this->Disk);
return false;
}
// Clear acl and xattr fields not useful for distribution.
@@ -245,7 +252,7 @@ bool cmArchiveWrite::AddFile(const char* file,
if(archive_write_header(this->Archive, e) != ARCHIVE_OK)
{
this->Error = "archive_write_header: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return false;
}
@@ -292,7 +299,7 @@ bool cmArchiveWrite::AddData(const char* file, size_t size)
if(archive_write_data(this->Archive, buffer, nnext) != nnext_s)
{
this->Error = "archive_write_data: ";
- this->Error += archive_error_string(this->Archive);
+ this->Error += cm_archive_error_string(this->Archive);
return false;
}
nleft -= nnext;
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 9e0064e..cc9fa57 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -750,11 +750,7 @@ void cmCacheManager::AddCacheEntry(const char* key,
}
e.SetProperty("HELPSTRING", helpString? helpString :
"(This variable does not exist and should not be used)");
- if (this->Cache[key].Value == e.Value)
- {
- this->CMakeInstance->UnwatchUnusedCli(key);
- }
- this->Cache[key] = e;
+ this->CMakeInstance->UnwatchUnusedCli(key);
}
bool cmCacheManager::CacheIterator::IsAtEnd() const
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 7870564..9136869 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -349,9 +349,12 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
cmMakefile *makefile = depender->GetMakefile();
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
+ cmOStringStream e;
switch(depender->GetPolicyStatusCMP0046())
{
case cmPolicies::WARN:
+ e << (makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0046)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -364,9 +367,7 @@ void cmComputeTargetDepends::AddTargetDepend(int depender_index,
if(issueMessage)
{
cmake* cm = this->GlobalGenerator->GetCMakeInstance();
- cmOStringStream e;
- e << (makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0046)) << "\n";
+
e << "The dependency target \"" << dependee_name
<< "\" of target \"" << depender->GetName() << "\" does not exist.";
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index d5472a1..e4a146c 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -765,7 +765,11 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
const char* compilerId)
{
/*
- gnu:
+ gnu >= 4.9:
+ A mod file is an ascii file compressed with gzip.
+ Compiling twice produces identical modules.
+
+ gnu < 4.9:
A mod file is an ascii file.
<bar.mod>
FORTRAN module created from /path/to/foo.f90 on Sun Dec 30 22:47:58 2007
@@ -821,21 +825,30 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
*/
if (strcmp(compilerId, "GNU") == 0 )
{
- const char seq[1] = {'\n'};
- const int seqlen = 1;
-
- if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen))
+ // GNU Fortran 4.9 and later compress .mod files with gzip
+ // but also do not include a date so we can fall through to
+ // compare them without skipping any prefix.
+ unsigned char hdr[2];
+ bool okay = finModFile.read(reinterpret_cast<char*>(hdr), 2)? true:false;
+ finModFile.seekg(0);
+ if(!(okay && hdr[0] == 0x1f && hdr[1] == 0x8b))
{
- // The module is of unexpected format. Assume it is different.
- std::cerr << compilerId << " fortran module " << modFile
- << " has unexpected format." << std::endl;
- return true;
- }
+ const char seq[1] = {'\n'};
+ const int seqlen = 1;
- if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen))
- {
- // The stamp must differ if the sequence is not contained.
- return true;
+ if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen))
+ {
+ // The module is of unexpected format. Assume it is different.
+ std::cerr << compilerId << " fortran module " << modFile
+ << " has unexpected format." << std::endl;
+ return true;
+ }
+
+ if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen))
+ {
+ // The stamp must differ if the sequence is not contained.
+ return true;
+ }
}
}
else if(strcmp(compilerId, "Intel") == 0)
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 9c27fc1..9df1e79 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -30,6 +30,8 @@ static const char *cmDocumentationStandardOptions[][2] =
"Print usage information and exit."},
{"--version,-version,/V [<f>]",
"Print version number and exit."},
+ {"--help-full [<f>]",
+ "Print all help manuals and exit."},
{"--help-manual <man> [<f>]",
"Print one help manual and exit."},
{"--help-manual-list [<f>]",
@@ -100,7 +102,7 @@ bool cmDocumentation::PrintVersion(std::ostream& os)
this->GetNameString() <<
" version " << cmVersion::GetCMakeVersion() << "\n"
"\n"
- "CMake suite maintained by Kitware, Inc. (kitware.com).\n"
+ "CMake suite maintained and supported by Kitware (kitware.com/cmake).\n"
;
return true;
}
@@ -112,6 +114,8 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
{
case cmDocumentation::Usage:
return this->PrintDocumentationUsage(os);
+ case cmDocumentation::Full:
+ return this->PrintHelpFull(os);
case cmDocumentation::OneManual:
return this->PrintHelpOneManual(os);
case cmDocumentation::OneCommand:
@@ -364,9 +368,9 @@ bool cmDocumentation::CheckOptions(int argc, const char* const* argv,
}
else if(strcmp(argv[i], "--help-full") == 0)
{
+ help.HelpType = cmDocumentation::Full;
GET_OPT_ARGUMENT(help.Filename);
- cmSystemTools::Message("Warning: --help-full no longer supported");
- return true;
+ this->WarnFormFromFilename(help, result);
}
else if(strcmp(argv[i], "--help-html") == 0)
{
@@ -678,6 +682,12 @@ bool cmDocumentation::PrintFiles(std::ostream& os,
}
//----------------------------------------------------------------------------
+bool cmDocumentation::PrintHelpFull(std::ostream& os)
+{
+ return this->PrintFiles(os, "index");
+}
+
+//----------------------------------------------------------------------------
bool cmDocumentation::PrintHelpOneManual(std::ostream& os)
{
std::string mname = this->CurrentArgument;
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index d5a7dd5..cc16eb7 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -102,6 +102,7 @@ private:
bool PrintFiles(std::ostream& os, std::string const& pattern);
bool PrintVersion(std::ostream& os);
+ bool PrintHelpFull(std::ostream& os);
bool PrintHelpOneManual(std::ostream& os);
bool PrintHelpOneCommand(std::ostream& os);
bool PrintHelpOneModule(std::ostream& os);
diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h
index 118f03d..61766b9 100644
--- a/Source/cmDocumentationFormatter.h
+++ b/Source/cmDocumentationFormatter.h
@@ -26,7 +26,7 @@ public:
/** Types of help provided. */
enum Type
{
- None, Version, Usage, ListManuals,
+ None, Version, Usage, Full, ListManuals,
ListCommands, ListModules, ListProperties, ListVariables, ListPolicies,
OneManual, OneCommand, OneModule, OneProperty, OneVariable, OnePolicy,
OldCustomModules
diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx
index 33c43ca..810802a 100644
--- a/Source/cmGetPropertyCommand.cxx
+++ b/Source/cmGetPropertyCommand.cxx
@@ -302,7 +302,8 @@ bool cmGetPropertyCommand::HandleTargetMode()
}
if(cmTarget* target = this->Makefile->FindTargetToUse(this->Name))
{
- return this->StoreResult(target->GetProperty(this->PropertyName.c_str()));
+ return this->StoreResult(target->GetProperty(this->PropertyName.c_str(),
+ this->Makefile));
}
else
{
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index 4aa49fe..272607e 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -38,7 +38,7 @@ bool cmGetTargetPropertyCommand
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
{
cmTarget& target = *tgt;
- prop = target.GetProperty(args[2].c_str());
+ prop = target.GetProperty(args[2].c_str(), this->Makefile);
}
else
{
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 4f3328d..beb10da 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -759,7 +759,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
switch(mf->GetPolicyStatus(cmPolicies::CMP0025))
{
case cmPolicies::WARN:
- if(!this->CMakeInstance->GetIsInTryCompile())
+ if(!this->CMakeInstance->GetIsInTryCompile() &&
+ mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0025"))
{
cmOStringStream w;
w << policies->GetPolicyWarning(cmPolicies::CMP0025) << "\n"
@@ -790,7 +791,8 @@ void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
switch(mf->GetPolicyStatus(cmPolicies::CMP0047))
{
case cmPolicies::WARN:
- if(!this->CMakeInstance->GetIsInTryCompile())
+ if(!this->CMakeInstance->GetIsInTryCompile() &&
+ mf->PolicyOptionalWarningEnabled("CMAKE_POLICY_WARNING_CMP0047"))
{
cmOStringStream w;
w << policies->GetPolicyWarning(cmPolicies::CMP0047) << "\n"
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 731bc00..60643ac 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -972,7 +972,16 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
{
knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
}
+ //get list files which are implicit dependencies as well and will be phony
+ //for rebuild manifest
+ std::vector<std::string> const& lf = (*i)->GetMakefile()->GetListFiles();
+ typedef std::vector<std::string>::const_iterator vect_it;
+ for(vect_it j = lf.begin(); j != lf.end(); ++j)
+ {
+ knownDependencies.insert( ng->ConvertToNinjaPath( j->c_str() ) );
+ }
}
+ knownDependencies.insert( "CMakeCache.txt" );
for(std::vector<cmGeneratorExpressionEvaluationFile*>::const_iterator
li = this->EvaluationFiles.begin();
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 484b28f..3503e19 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2298,7 +2298,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
}
}
- buildSettings->AddAttribute("OTHER_LDFLAGS",
+ buildSettings->AddAttribute(this->GetTargetLinkFlagsVar(target),
this->CreateString(extraLinkOptions.c_str()));
buildSettings->AddAttribute("OTHER_REZFLAGS",
this->CreateString(""));
@@ -2522,6 +2522,22 @@ std::string cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target,
}
//----------------------------------------------------------------------------
+const char*
+cmGlobalXCodeGenerator::GetTargetLinkFlagsVar(cmTarget const& cmtarget) const
+{
+ if(this->XcodeVersion >= 60 &&
+ (cmtarget.GetType() == cmTarget::STATIC_LIBRARY ||
+ cmtarget.GetType() == cmTarget::OBJECT_LIBRARY))
+ {
+ return "OTHER_LIBTOOLFLAGS";
+ }
+ else
+ {
+ return "OTHER_LDFLAGS";
+ }
+}
+
+//----------------------------------------------------------------------------
const char* cmGlobalXCodeGenerator::GetTargetFileType(cmTarget& cmtarget)
{
switch(cmtarget.GetType())
@@ -2834,8 +2850,9 @@ void cmGlobalXCodeGenerator
sep = " ";
linkObjs += this->XCodeEscapePath(oi->c_str());
}
- this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
- linkObjs.c_str(), configName);
+ this->AppendBuildSettingAttribute(
+ target, this->GetTargetLinkFlagsVar(*cmtarget),
+ linkObjs.c_str(), configName);
}
// Skip link information for object libraries.
@@ -2913,8 +2930,9 @@ void cmGlobalXCodeGenerator
target->AddDependTarget(configName, li->Target->GetName());
}
}
- this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS",
- linkLibs.c_str(), configName);
+ this->AppendBuildSettingAttribute(
+ target, this->GetTargetLinkFlagsVar(*cmtarget),
+ linkLibs.c_str(), configName);
}
}
}
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index c9d20c2..a7b54e9 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -141,6 +141,7 @@ private:
cmXCodeObject* buildPhases);
void ForceLinkerLanguages();
void ForceLinkerLanguage(cmTarget& cmtarget);
+ const char* GetTargetLinkFlagsVar(cmTarget const& cmtarget) const;
const char* GetTargetFileType(cmTarget& cmtarget);
const char* GetTargetProductType(cmTarget& cmtarget);
std::string AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget);
diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx
index e8ee33f..fbcbc75 100644
--- a/Source/cmIncludeCommand.cxx
+++ b/Source/cmIncludeCommand.cxx
@@ -98,11 +98,14 @@ bool cmIncludeCommand
if (gg->IsExportedTargetsFile(fname_abs))
{
const char *modal = 0;
+ cmOStringStream e;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0024))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -114,9 +117,6 @@ bool cmIncludeCommand
}
if (modal)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0024)) << "\n";
e << "The file\n " << fname_abs << "\nwas generated by the export() "
"command. It " << modal << " not be used as the argument to the "
"include() command. Use ALIAS targets instead to refer to targets "
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 7a39f45..38d369e 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -213,6 +213,20 @@ void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os,
filesFrom.push_back(from1);
filesTo.push_back(to1);
}
+ else if(this->Target->IsCFBundleOnApple())
+ {
+ // Install the whole app bundle directory.
+ type = cmInstallType_DIRECTORY;
+ literal_args += " USE_SOURCE_PERMISSIONS";
+
+ std::string targetNameBase = targetName.substr(0, targetName.find('/'));
+
+ std::string from1 = fromDirConfig + targetNameBase;
+ std::string to1 = toDir + targetName;
+
+ filesFrom.push_back(from1);
+ filesTo.push_back(to1);
+ }
else
{
bool haveNamelink = false;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 10137ec..27ce999 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -893,9 +893,12 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
{
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
bool issueMessage = false;
+ cmOStringStream e;
switch(this->GetPolicyStatus(cmPolicies::CMP0040))
{
case cmPolicies::WARN:
+ e << (this->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
issueMessage = true;
case cmPolicies::OLD:
break;
@@ -908,9 +911,6 @@ cmMakefile::AddCustomCommandToTarget(const char* target,
if(issueMessage)
{
- cmOStringStream e;
- e << (this->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0040)) << "\n";
e << "The target name \"" << target << "\" is unknown in this context.";
IssueMessage(messageType, e.str().c_str());
}
@@ -4350,6 +4350,22 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
return this->GetPolicies()->GetPolicyStatus(id);
}
+//----------------------------------------------------------------------------
+bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var)
+{
+ // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
+ if(!var.empty())
+ {
+ if(const char* val = this->GetDefinition(var.c_str()))
+ {
+ return cmSystemTools::IsOn(val);
+ }
+ }
+ // Enable optional policy warnings with --debug-output or --trace.
+ cmake* cm = this->GetCMakeInstance();
+ return cm->GetDebugOutput() || cm->GetTrace();
+}
+
bool cmMakefile::SetPolicy(const char *id,
cmPolicies::PolicyStatus status)
{
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 45f3b9f..f00fd20 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -875,6 +875,8 @@ public:
std::set<cmStdString> const & GetSystemIncludeDirectories() const
{ return this->SystemIncludeDirectories; }
+ bool PolicyOptionalWarningEnabled(std::string const& var);
+
protected:
// add link libraries and directories to the target
void AddGlobalLinkInformation(const char* name, cmTarget& target);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 900af8d..3220fba 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -369,8 +369,10 @@ cmNinjaTargetGenerator
const std::string cId = mf->GetDefinition("CMAKE_C_COMPILER_ID")
? mf->GetSafeDefinition("CMAKE_C_COMPILER_ID")
: mf->GetSafeDefinition("CMAKE_CXX_COMPILER_ID");
-
- const bool usingMSVC = (cId == "MSVC" || cId == "Intel");
+ const std::string sId = mf->GetDefinition("CMAKE_C_SIMULATE_ID")
+ ? mf->GetSafeDefinition("CMAKE_C_SIMULATE_ID")
+ : mf->GetSafeDefinition("CMAKE_CXX_SIMULATE_ID");
+ const bool usingMSVC = (cId == "MSVC" || sId == "MSVC");
// Tell ninja dependency format so all deps can be loaded into a database
std::string deptype;
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 9a340dc..448d77c 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -178,7 +178,7 @@ void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
// Configure the Info.plist file. Note that it needs the executable name
// to be set.
- std::string plist =
+ std::string plist = root + "/" +
this->Target->GetCFBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index ff05975..575b973 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -917,8 +917,10 @@ bool cmSystemTools::RenameFile(const char* oldname, const char* newname)
cmsys::Encoding::ToWide(newname).c_str(),
MOVEFILE_REPLACE_EXISTING) && --retry.Count)
{
- // Try again only if failure was due to access permissions.
- if(GetLastError() != ERROR_ACCESS_DENIED)
+ DWORD last_error = GetLastError();
+ // Try again only if failure was due to access/sharing permissions.
+ if(last_error != ERROR_ACCESS_DENIED &&
+ last_error != ERROR_SHARING_VIOLATION)
{
return false;
}
@@ -2161,6 +2163,11 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
cmSystemToolsCMakeCommand = exe_dir;
cmSystemToolsCMakeCommand += "/cmake";
cmSystemToolsCMakeCommand += cmSystemTools::GetExecutableExtension();
+#ifndef CMAKE_BUILD_WITH_CMAKE
+ // The bootstrap cmake does not provide the other tools,
+ // so use the directory where they are about to be built.
+ exe_dir = CMAKE_BOOTSTRAP_BINARY_DIR "/bin";
+#endif
cmSystemToolsCTestCommand = exe_dir;
cmSystemToolsCTestCommand += "/ctest";
cmSystemToolsCTestCommand += cmSystemTools::GetExecutableExtension();
@@ -2213,7 +2220,7 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
}
#else
// Bootstrap build knows its source.
- cmSystemToolsCMakeRoot = CMAKE_ROOT_DIR;
+ cmSystemToolsCMakeRoot = CMAKE_BOOTSTRAP_SOURCE_DIR;
#endif
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 0c89656..63c5908 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2624,23 +2624,20 @@ const char* cmTarget::GetFeature(const char* feature, const char* config) const
}
//----------------------------------------------------------------------------
-const char *cmTarget::GetProperty(const char* prop) const
-{
- return this->GetProperty(prop, cmProperty::TARGET);
-}
-
-//----------------------------------------------------------------------------
-bool cmTarget::HandleLocationPropertyPolicy() const
+bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const
{
if (this->IsImported())
{
return true;
}
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
- switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0026))
+ switch (context->GetPolicyStatus(cmPolicies::CMP0026))
{
case cmPolicies::WARN:
+ e << (this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0026)) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -2653,22 +2650,25 @@ bool cmTarget::HandleLocationPropertyPolicy() const
if (modal)
{
- cmOStringStream e;
- e << (this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0026)) << "\n";
e << "The LOCATION property " << modal << " not be read from target \""
<< this->GetName() << "\". Use the target name directly with "
"add_custom_command, or use the generator expression $<TARGET_FILE>, "
"as appropriate.\n";
- this->Makefile->IssueMessage(messageType, e.str().c_str());
+ context->IssueMessage(messageType, e.str().c_str());
}
return messageType != cmake::FATAL_ERROR;
}
//----------------------------------------------------------------------------
+const char *cmTarget::GetProperty(const char* prop) const
+{
+ return this->GetProperty(prop, this->Makefile);
+}
+
+//----------------------------------------------------------------------------
const char *cmTarget::GetProperty(const char* prop,
- cmProperty::ScopeType scope) const
+ cmMakefile* context) const
{
if(!prop)
{
@@ -2681,7 +2681,7 @@ const char *cmTarget::GetProperty(const char* prop,
cmOStringStream e;
e << "INTERFACE_LIBRARY targets may only have whitelisted properties. "
"The property \"" << prop << "\" is not allowed.";
- this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
+ context->IssueMessage(cmake::FATAL_ERROR, e.str().c_str());
return 0;
}
@@ -2700,7 +2700,7 @@ const char *cmTarget::GetProperty(const char* prop,
{
if(strcmp(prop,"LOCATION") == 0)
{
- if (!this->HandleLocationPropertyPolicy())
+ if (!this->HandleLocationPropertyPolicy(context))
{
return 0;
}
@@ -2721,7 +2721,7 @@ const char *cmTarget::GetProperty(const char* prop,
// Support "LOCATION_<CONFIG>".
if(cmHasLiteralPrefix(prop, "LOCATION_"))
{
- if (!this->HandleLocationPropertyPolicy())
+ if (!this->HandleLocationPropertyPolicy(context))
{
return 0;
}
@@ -2736,7 +2736,7 @@ const char *cmTarget::GetProperty(const char* prop,
std::string configName(prop, strlen(prop) - 9);
if(configName != "IMPORTED")
{
- if (!this->HandleLocationPropertyPolicy())
+ if (!this->HandleLocationPropertyPolicy(context))
{
return 0;
}
@@ -2857,10 +2857,10 @@ const char *cmTarget::GetProperty(const char* prop,
}
bool chain = false;
const char *retVal =
- this->Properties.GetPropertyValue(prop, scope, chain);
+ this->Properties.GetPropertyValue(prop, cmProperty::TARGET, chain);
if (chain)
{
- return this->Makefile->GetProperty(prop,scope);
+ return this->Makefile->GetProperty(prop, cmProperty::TARGET);
}
return retVal;
}
@@ -5515,11 +5515,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
}
}
}
- if(this->LinkLanguagePropagatesToDependents())
- {
- // Targets using this archive need its language runtime libraries.
- iface.Languages = impl->Languages;
- }
}
}
}
@@ -5536,11 +5531,6 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
iface.ImplementationIsInterface = true;
iface.Libraries = impl->Libraries;
iface.WrongConfigLibraries = impl->WrongConfigLibraries;
- if(this->LinkLanguagePropagatesToDependents())
- {
- // Targets using this archive need its language runtime libraries.
- iface.Languages = impl->Languages;
- }
if(this->PolicyStatusCMP0022 == cmPolicies::WARN &&
!this->Internal->PolicyWarnedCMP0022)
@@ -5607,6 +5597,16 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface,
}
}
+ if(this->LinkLanguagePropagatesToDependents())
+ {
+ // Targets using this archive need its language runtime libraries.
+ if(LinkImplementation const* impl =
+ this->GetLinkImplementation(config, headTarget))
+ {
+ iface.Languages = impl->Languages;
+ }
+ }
+
if(this->GetType() == cmTarget::STATIC_LIBRARY)
{
// How many repetitions are needed if this library has cyclic
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 0e9d682..a305caa 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -257,7 +257,7 @@ public:
void SetProperty(const char *prop, const char *value);
void AppendProperty(const char* prop, const char* value,bool asString=false);
const char *GetProperty(const char *prop) const;
- const char *GetProperty(const char *prop, cmProperty::ScopeType scope) const;
+ const char *GetProperty(const char *prop, cmMakefile* context) const;
bool GetPropertyAsBool(const char *prop) const;
void CheckProperty(const char* prop, cmMakefile* context) const;
@@ -580,7 +580,7 @@ public:
const std::string &compatibilityType) const;
private:
- bool HandleLocationPropertyPolicy() const;
+ bool HandleLocationPropertyPolicy(cmMakefile* context) const;
// The set of include directories that are marked as system include
// directories.
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 02da933..95a2cba 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -103,11 +103,14 @@ bool cmTargetLinkLibrariesCommand
if (this->Target->GetType() == cmTarget::UTILITY)
{
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0039))
{
case cmPolicies::WARN:
+ e << this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0039) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -119,9 +122,7 @@ bool cmTargetLinkLibrariesCommand
}
if (modal)
{
- cmOStringStream e;
- e << this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0039) << "\n"
+ e <<
"Utility target \"" << this->Target->GetName() << "\" " << modal
<< " not be used as the target of a target_link_libraries call.";
this->Makefile->IssueMessage(messageType, e.str().c_str());
@@ -373,11 +374,14 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
? cmTarget::KeywordTLLSignature : cmTarget::PlainTLLSignature;
if (!this->Target->PushTLLCommandTrace(sig))
{
+ cmOStringStream e;
const char *modal = 0;
cmake::MessageType messageType = cmake::AUTHOR_WARNING;
switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0023))
{
case cmPolicies::WARN:
+ e << this->Makefile->GetPolicies()
+ ->GetPolicyWarning(cmPolicies::CMP0023) << "\n";
modal = "should";
case cmPolicies::OLD:
break;
@@ -390,14 +394,12 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
if(modal)
{
- cmOStringStream e;
// If the sig is a keyword form and there is a conflict, the existing
// form must be the plain form.
const char *existingSig
= (sig == cmTarget::KeywordTLLSignature ? "plain"
: "keyword");
- e << this->Makefile->GetPolicies()
- ->GetPolicyWarning(cmPolicies::CMP0023) << "\n"
+ e <<
"The " << existingSig << " signature for target_link_libraries "
"has already been used with the target \""
<< this->Target->GetName() << "\". All uses of "
diff --git a/Source/cmVS10LinkFlagTable.h b/Source/cmVS10LinkFlagTable.h
index 5d15620..f6b758d 100644
--- a/Source/cmVS10LinkFlagTable.h
+++ b/Source/cmVS10LinkFlagTable.h
@@ -191,10 +191,7 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
{"LinkDLL", "DLL", "", "true", 0},
//Bool Properties With Argument
- {"EnableUAC", "MANIFESTUAC:NO", "", "false",
- cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
- {"EnableUAC", "MANIFESTUAC:NO", "Enable User Account Control (UAC)", "",
- cmVS7FlagTable::UserValueRequired},
+ {"EnableUAC", "MANIFESTUAC:NO", "", "false", 0},
{"EnableUAC", "MANIFESTUAC:", "", "true",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "",
diff --git a/Source/cmVS11LinkFlagTable.h b/Source/cmVS11LinkFlagTable.h
index b4587a8..0f641e4 100644
--- a/Source/cmVS11LinkFlagTable.h
+++ b/Source/cmVS11LinkFlagTable.h
@@ -217,10 +217,7 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] =
{"LinkDLL", "DLL", "", "true", 0},
//Bool Properties With Argument
- {"EnableUAC", "MANIFESTUAC:NO", "", "false",
- cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
- {"EnableUAC", "MANIFESTUAC:NO", "Enable User Account Control (UAC)", "",
- cmVS7FlagTable::UserValueRequired},
+ {"EnableUAC", "MANIFESTUAC:NO", "", "false", 0},
{"EnableUAC", "MANIFESTUAC:", "", "true",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "",
diff --git a/Source/cmVS12LinkFlagTable.h b/Source/cmVS12LinkFlagTable.h
index 73d450a..e5a570e 100644
--- a/Source/cmVS12LinkFlagTable.h
+++ b/Source/cmVS12LinkFlagTable.h
@@ -217,10 +217,7 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] =
{"LinkDLL", "DLL", "", "true", 0},
//Bool Properties With Argument
- {"EnableUAC", "MANIFESTUAC:NO", "", "false",
- cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
- {"EnableUAC", "MANIFESTUAC:NO", "Enable User Account Control (UAC)", "",
- cmVS7FlagTable::UserValueRequired},
+ {"EnableUAC", "MANIFESTUAC:NO", "", "false", 0},
{"EnableUAC", "MANIFESTUAC:", "", "true",
cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue},
{"UACUIAccess", "MANIFESTUAC:", "Enable User Account Control (UAC)", "",
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index abbabe7..fafcca8 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -339,16 +339,24 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
// The value is transformed if it is a filepath for example, so
// we can't compare whether the value is already in the cache until
// after we call AddCacheEntry.
- const char *cachedValue =
- this->CacheManager->GetCacheValue(var.c_str());
+ bool haveValue = false;
+ std::string cachedValue;
+ if(this->WarnUnusedCli)
+ {
+ if(const char *v = this->CacheManager->GetCacheValue(var.c_str()))
+ {
+ haveValue = true;
+ cachedValue = v;
+ }
+ }
this->CacheManager->AddCacheEntry(var.c_str(), value.c_str(),
"No help, variable specified on the command line.", type);
+
if(this->WarnUnusedCli)
{
- if (!cachedValue
- || strcmp(this->CacheManager->GetCacheValue(var.c_str()),
- cachedValue) != 0)
+ if (!haveValue ||
+ cachedValue != this->CacheManager->GetCacheValue(var.c_str()))
{
this->WatchUnusedCli(var.c_str());
}
@@ -1231,7 +1239,10 @@ int cmake::HandleDeleteCacheVariables(const char* var)
if(ci.Find(save.key.c_str()))
{
save.type = ci.GetType();
- save.help = ci.GetProperty("HELPSTRING");
+ if(const char* help = ci.GetProperty("HELPSTRING"))
+ {
+ save.help = help;
+ }
}
saved.push_back(save);
}
@@ -2664,11 +2675,17 @@ int cmake::Build(const std::string& dir,
}
if(!it.Find("CMAKE_GENERATOR"))
{
- std::cerr << "Error: could find generator in Cache\n";
+ std::cerr << "Error: could not find CMAKE_GENERATOR in Cache\n";
return 1;
}
cmsys::auto_ptr<cmGlobalGenerator> gen(
this->CreateGlobalGenerator(it.GetValue()));
+ if(!gen.get())
+ {
+ std::cerr << "Error: could create CMAKE_GENERATOR \""
+ << it.GetValue() << "\"\n";
+ return 1;
+ }
std::string output;
std::string projName;
if(!it.Find("CMAKE_PROJECT_NAME"))
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 3eb5551..b6b3d31 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -44,7 +44,8 @@ static const char * cmDocumentationOptions[][2] =
{"-V,--verbose", "Enable verbose output from tests."},
{"-VV,--extra-verbose", "Enable more verbose output from tests."},
{"--debug", "Displaying more verbose internals of CTest."},
- {"--output-on-failure"},
+ {"--output-on-failure", "Output anything outputted by the test program "
+ "if the test should fail."},
{"-F", "Enable failover."},
{"-j <jobs>, --parallel <jobs>", "Run the tests in parallel using the"
"given number of jobs."},
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index faeb967..241e295 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -2413,6 +2413,12 @@ static void kwsysProcessKill(pid_t process_id)
/* Suspend the process to be sure it will not create more children. */
kill(process_id, SIGSTOP);
+#if defined(__CYGWIN__)
+ /* Some Cygwin versions seem to need help here. Give up our time slice
+ so that the child can process SIGSTOP before we send SIGKILL. */
+ usleep(1);
+#endif
+
/* Kill all children if we can find them. */
#if defined(__linux__) || defined(__CYGWIN__)
/* First try using the /proc filesystem. */
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 5f20853..a03b39c 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -88,15 +88,6 @@ typedef int siginfo_t;
# include <ifaddrs.h>
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
-# include <execinfo.h>
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
-# include <cxxabi.h>
-# endif
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
-# include <dlfcn.h>
-# endif
-# endif
#endif
#if defined(__OpenBSD__) || defined(__NetBSD__)
@@ -126,16 +117,8 @@ typedef int siginfo_t;
# include <ifaddrs.h>
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif
-# if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
-# include <execinfo.h>
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
-# include <cxxabi.h>
-# endif
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
-# include <dlfcn.h>
-# endif
-# endif
+# if !(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0 >= 1050)
+# undef KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE
# endif
#endif
@@ -150,15 +133,6 @@ typedef int siginfo_t;
# define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
# endif
# endif
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
-# include <execinfo.h>
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
-# include <cxxabi.h>
-# endif
-# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
-# include <dlfcn.h>
-# endif
-# endif
# if defined(KWSYS_CXX_HAS_RLIMIT64)
typedef struct rlimit64 ResourceLimitType;
# define GetResourceLimit getrlimit64
@@ -178,6 +152,19 @@ typedef struct rlimit ResourceLimitType;
# include <OS.h>
#endif
+#if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
+# include <execinfo.h>
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
+# include <cxxabi.h>
+# endif
+# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
+# include <dlfcn.h>
+# endif
+#else
+# undef KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE
+# undef KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP
+#endif
+
#include <memory.h>
#include <stdlib.h>
#include <stdio.h>
@@ -3709,7 +3696,10 @@ void SystemInformationImplementation::SetStackTraceOnError(int enable)
// install ours
struct sigaction sa;
sa.sa_sigaction=(SigAction)StacktraceSignalHandler;
- sa.sa_flags=SA_SIGINFO|SA_RESTART|SA_RESETHAND;
+ sa.sa_flags=SA_SIGINFO|SA_RESETHAND;
+# ifdef SA_RESTART
+ sa.sa_flags|=SA_RESTART;
+# endif
sigemptyset(&sa.sa_mask);
sigaction(SIGABRT,&sa,0);
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index f4a443f..e5d8bde 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -92,7 +92,7 @@ extern char **environ;
#endif
#ifdef __CYGWIN__
-extern "C" void cygwin_conv_to_win32_path(const char *path, char *win32_path);
+# include <sys/cygwin.h>
#endif
// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
@@ -1110,7 +1110,10 @@ bool SystemTools::PathCygwinToWin32(const char *path, char *win32_path)
}
else
{
- cygwin_conv_to_win32_path(path, win32_path);
+ if(cygwin_conv_path(CCP_POSIX_TO_WIN_A, path, win32_path, MAX_PATH) != 0)
+ {
+ win32_path[0] = 0;
+ }
SystemToolsTranslationMap::value_type entry(path, win32_path);
SystemTools::Cyg2Win32Map->insert(entry);
}