summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmArchiveWrite.cxx35
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx12
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx5
4 files changed, 29 insertions, 25 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 60da8d6..6ac332b 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 20140416)
+set(CMake_VERSION_PATCH 20140417)
#set(CMake_VERSION_RC 1)
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/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 8acc5b4..946d9d2 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -443,26 +443,22 @@ cmExtraCodeLiteGenerator::GetConfigurationName(const cmMakefile* mf) const
std::string
cmExtraCodeLiteGenerator::GetBuildCommand(const cmMakefile* mf) const
{
- std::stringstream ss;
std::string generator = mf->GetSafeDefinition("CMAKE_GENERATOR");
std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
std::string buildCommand = make; // Default
- if ( generator == "NMake Makefiles" )
+ if ( generator == "NMake Makefiles" ||
+ generator == "Ninja" )
{
buildCommand = make;
}
else if ( generator == "MinGW Makefiles" ||
generator == "Unix Makefiles" )
{
+ std::stringstream ss;
ss << make << " -j " << this->CpuCount;
buildCommand = ss.str();
}
- else if ( generator == "Ninja" )
- {
- ss << make;
- buildCommand = ss.str();
- }
- return buildCommand;
+ return buildCommand;
}
std::string
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a999b2d..72bb020 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -685,7 +685,8 @@ cmVisualStudio10TargetGenerator::ConvertPath(std::string const& path,
this->Makefile->GetCurrentOutputDirectory(), path.c_str())
: this->LocalGenerator->Convert(path.c_str(),
cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED);
+ cmLocalGenerator::UNCHANGED,
+ /* optional = */ true);
}
void cmVisualStudio10TargetGenerator::ConvertToWindowsSlash(std::string& s)
@@ -941,7 +942,7 @@ void cmVisualStudio10TargetGenerator::WriteSource(
// c:\path\to\current\dir\..\..\..\relative\path\to\source.c
//
// and fail if this exceeds the maximum allowed path length. Our path
- // conversion uses full paths outside the build tree to allow deeper trees.
+ // conversion uses full paths when possible to allow deeper trees.
bool forceRelative = false;
std::string sourceFile = this->ConvertPath(sf->GetFullPath(), false);
if(this->LocalGenerator->GetVersion() == cmLocalVisualStudioGenerator::VS10