summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx9
-rw-r--r--Source/cmELF.cxx13
-rw-r--r--Source/kwsys/Directory.cxx31
-rw-r--r--Source/kwsys/SystemTools.cxx9
-rw-r--r--Source/kwsys/SystemTools.hxx.in1
6 files changed, 49 insertions, 16 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index f203b3c..a742e33 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 6)
-set(CMake_VERSION_PATCH 20160802)
+set(CMake_VERSION_PATCH 20160803)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 97216c3..3ecc14d 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -464,7 +464,14 @@ bool cmCPackWIXGenerator::CreateWiXSourceFiles()
return false;
}
- featureDefinitions.AddAttribute("Title", cpackPackageName);
+ std::string featureTitle = cpackPackageName;
+ if (const char* title = GetOption("CPACK_WIX_ROOT_FEATURE_TITLE")) {
+ featureTitle = title;
+ }
+ featureDefinitions.AddAttribute("Title", featureTitle);
+ if (const char* desc = GetOption("CPACK_WIX_ROOT_FEATURE_DESCRIPTION")) {
+ featureDefinitions.AddAttribute("Description", desc);
+ }
featureDefinitions.AddAttribute("Level", "1");
this->Patch->ApplyFragment("#PRODUCTFEATURE", featureDefinitions);
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index 15755cb..266b786 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -46,6 +46,9 @@ typedef struct Elf32_Rela Elf32_Rela;
#if defined(__sun)
#include <sys/link.h> // For dynamic section information
#endif
+#ifdef _SCO_DS
+#include <link.h> // For DT_SONAME etc.
+#endif
// Low-level byte swapping implementation.
template <size_t s>
@@ -214,6 +217,7 @@ struct cmELFTypes32
};
// Configure the implementation template for 64-bit ELF files.
+#ifndef _SCO_DS
struct cmELFTypes64
{
typedef Elf64_Ehdr ELF_Ehdr;
@@ -223,6 +227,7 @@ struct cmELFTypes64
typedef KWIML_INT_uint64_t tagtype;
static const char* GetName() { return "64-bit"; }
};
+#endif
// Parser implementation template.
template <class Types>
@@ -800,10 +805,14 @@ cmELF::cmELF(const char* fname)
if (ident[EI_CLASS] == ELFCLASS32) {
// 32-bit ELF
this->Internal = new cmELFInternalImpl<cmELFTypes32>(this, fin, order);
- } else if (ident[EI_CLASS] == ELFCLASS64) {
+ }
+#ifndef _SCO_DS
+ else if (ident[EI_CLASS] == ELFCLASS64) {
// 64-bit ELF
this->Internal = new cmELFInternalImpl<cmELFTypes64>(this, fin, order);
- } else {
+ }
+#endif
+ else {
this->ErrorMessage = "ELF file class is not 32-bit or 64-bit.";
return;
}
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index c549792..15480e1 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -84,9 +84,9 @@ void Directory::Clear()
} // namespace KWSYS_NAMESPACE
-// First microsoft compilers
+// First Windows platforms
-#if defined(_MSC_VER) || defined(__WATCOMC__)
+#if defined(_WIN32) && !defined(__CYGWIN__)
#include <windows.h>
#include <io.h>
#include <ctype.h>
@@ -97,15 +97,25 @@ void Directory::Clear()
#include <sys/stat.h>
#include <sys/types.h>
+// Wide function names can vary depending on compiler:
+#ifdef __BORLANDC__
+# define _wfindfirst_func __wfindfirst
+# define _wfindnext_func __wfindnext
+#else
+# define _wfindfirst_func _wfindfirst
+# define _wfindnext_func _wfindnext
+#endif
+
namespace KWSYS_NAMESPACE
{
bool Directory::Load(const std::string& name)
{
this->Clear();
-#if _MSC_VER < 1300
+#if (defined(_MSC_VER) && _MSC_VER < 1300) || defined(__BORLANDC__)
+ // Older Visual C++ and Embarcadero compilers.
long srchHandle;
-#else
+#else // Newer Visual C++
intptr_t srchHandle;
#endif
char* buf;
@@ -132,7 +142,7 @@ bool Directory::Load(const std::string& name)
struct _wfinddata_t data; // data of current file
// Now put them into the file array
- srchHandle = _wfindfirst((wchar_t*)Encoding::ToWide(buf).c_str(), &data);
+ srchHandle = _wfindfirst_func((wchar_t*)Encoding::ToWide(buf).c_str(), &data);
delete [] buf;
if ( srchHandle == -1 )
@@ -145,16 +155,17 @@ bool Directory::Load(const std::string& name)
{
this->Internal->Files.push_back(Encoding::ToNarrow(data.name));
}
- while ( _wfindnext(srchHandle, &data) != -1 );
+ while ( _wfindnext_func(srchHandle, &data) != -1 );
this->Internal->Path = name;
return _findclose(srchHandle) != -1;
}
unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
{
-#if _MSC_VER < 1300
+#if (defined(_MSC_VER) && _MSC_VER < 1300) || defined(__BORLANDC__)
+ // Older Visual C++ and Embarcadero compilers.
long srchHandle;
-#else
+#else // Newer Visual C++
intptr_t srchHandle;
#endif
char* buf;
@@ -172,7 +183,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
struct _wfinddata_t data; // data of current file
// Now put them into the file array
- srchHandle = _wfindfirst((wchar_t*)Encoding::ToWide(buf).c_str(), &data);
+ srchHandle = _wfindfirst_func((wchar_t*)Encoding::ToWide(buf).c_str(), &data);
delete [] buf;
if ( srchHandle == -1 )
@@ -186,7 +197,7 @@ unsigned long Directory::GetNumberOfFilesInDirectory(const std::string& name)
{
count++;
}
- while ( _wfindnext(srchHandle, &data) != -1 );
+ while ( _wfindnext_func(srchHandle, &data) != -1 );
_findclose(srchHandle);
return count;
}
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 0526372..9b56db0 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -523,7 +523,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
}
}
-const char* SystemTools::GetEnv(const char* key)
+const char* SystemTools::GetEnvImpl(const char* key)
{
const char *v = 0;
#if defined(_WIN32)
@@ -540,9 +540,14 @@ const char* SystemTools::GetEnv(const char* key)
return v;
}
+const char* SystemTools::GetEnv(const char* key)
+{
+ return SystemTools::GetEnvImpl(key);
+}
+
const char* SystemTools::GetEnv(const std::string& key)
{
- return SystemTools::GetEnv(key.c_str());
+ return SystemTools::GetEnvImpl(key.c_str());
}
bool SystemTools::GetEnv(const char* key, std::string& result)
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index 8f01e75..aa1bf1b 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -984,6 +984,7 @@ private:
std::vector<std::string>(),
bool no_system_path = false);
+ static const char* GetEnvImpl(const char* key);
/**
* Path translation table from dir to refdir