summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-15 14:15:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-11-15 14:15:29 (GMT)
commitb55f605e70f3186e6611f4f84dc246d39453af03 (patch)
tree9a53f93d80bbc1453f546e95514ba160676726d2
parent4f71b55908739cc20fcb0370031d8c2a07ae6688 (diff)
parentdc01c73f2d187d3a7e20527372f4e2888ffedc0a (diff)
downloadCMake-b55f605e70f3186e6611f4f84dc246d39453af03.zip
CMake-b55f605e70f3186e6611f4f84dc246d39453af03.tar.gz
CMake-b55f605e70f3186e6611f4f84dc246d39453af03.tar.bz2
Merge topic 'update-kwsys'
dc01c73f2d Merge branch 'upstream-KWSys' into update-kwsys 78ce959a40 KWSys 2019-11-13 (e67ed8ef) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4047
-rw-r--r--Source/kwsys/CTestCustom.cmake.in4
-rw-r--r--Source/kwsys/FStream.hxx.in14
-rw-r--r--Source/kwsys/RegularExpression.hxx.in11
-rw-r--r--Source/kwsys/SystemTools.cxx14
-rw-r--r--Source/kwsys/Terminal.c8
5 files changed, 33 insertions, 18 deletions
diff --git a/Source/kwsys/CTestCustom.cmake.in b/Source/kwsys/CTestCustom.cmake.in
index 760221b..c07f0f3 100644
--- a/Source/kwsys/CTestCustom.cmake.in
+++ b/Source/kwsys/CTestCustom.cmake.in
@@ -12,3 +12,7 @@
list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE
kwsys.testProcess-10
)
+
+list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
+ "LICENSE WARNING"
+ )
diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in
index d79bbdf..b424488 100644
--- a/Source/kwsys/FStream.hxx.in
+++ b/Source/kwsys/FStream.hxx.in
@@ -87,7 +87,7 @@ public:
bool _open(char const* file_name, std::ios_base::openmode mode)
{
- if (is_open() || file_) {
+ if (_is_open() || file_) {
return false;
}
# if defined(_MSC_VER)
@@ -108,7 +108,7 @@ public:
return success;
}
- bool is_open()
+ bool _is_open()
{
if (!buf_) {
return false;
@@ -116,7 +116,7 @@ public:
return buf_->is_open();
}
- bool is_open() const
+ bool _is_open() const
{
if (!buf_) {
return false;
@@ -198,9 +198,11 @@ public:
this->_set_state(this->_open(file_name, mode), this, this);
}
+ bool is_open() { return this->_is_open(); }
+
void close() { this->_set_state(this->_close(), this, this); }
- using basic_efilebuf<CharType, Traits>::is_open;
+ using basic_efilebuf<CharType, Traits>::_is_open;
internal_buffer_type* rdbuf() const { return this->buf_; }
@@ -212,7 +214,7 @@ class basic_ofstream
: public std::basic_ostream<CharType, Traits>
, public basic_efilebuf<CharType, Traits>
{
- using basic_efilebuf<CharType, Traits>::is_open;
+ using basic_efilebuf<CharType, Traits>::_is_open;
public:
typedef typename basic_efilebuf<CharType, Traits>::internal_buffer_type
@@ -242,6 +244,8 @@ public:
void close() { this->_set_state(this->_close(), this, this); }
+ bool is_open() { return this->_is_open(); }
+
internal_buffer_type* rdbuf() const { return this->buf_; }
~basic_ofstream() @KWSYS_NAMESPACE@_FStream_NOEXCEPT { close(); }
diff --git a/Source/kwsys/RegularExpression.hxx.in b/Source/kwsys/RegularExpression.hxx.in
index 0c2366b..d11db88 100644
--- a/Source/kwsys/RegularExpression.hxx.in
+++ b/Source/kwsys/RegularExpression.hxx.in
@@ -66,6 +66,13 @@ private:
const char* searchstring;
};
+#ifdef _MSC_VER
+# pragma warning(push)
+# if _MSC_VER < 1900
+# pragma warning(disable : 4351) /* new behavior */
+# endif
+#endif
+
/**
* \brief Creates an invalid match object
*/
@@ -76,6 +83,10 @@ inline RegularExpressionMatch::RegularExpressionMatch()
{
}
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
+
/**
* \brief Returns true if the match pointers are valid
*/
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index ce4d6ef..dcf05da 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -2326,14 +2326,8 @@ bool SystemTools::TextFilesDiffer(const std::string& path1,
static bool CopyFileContentBlockwise(const std::string& source,
const std::string& destination)
{
-// Open files
-#if defined(_WIN32)
- kwsys::ifstream fin(
- Encoding::ToNarrow(Encoding::ToWindowsExtendedPath(source)).c_str(),
- std::ios::in | std::ios::binary);
-#else
+ // Open files
kwsys::ifstream fin(source.c_str(), std::ios::in | std::ios::binary);
-#endif
if (!fin) {
return false;
}
@@ -2344,14 +2338,8 @@ static bool CopyFileContentBlockwise(const std::string& source,
// that do not allow file removal can be modified.
SystemTools::RemoveFile(destination);
-#if defined(_WIN32)
- kwsys::ofstream fout(
- Encoding::ToNarrow(Encoding::ToWindowsExtendedPath(destination)).c_str(),
- std::ios::out | std::ios::trunc | std::ios::binary);
-#else
kwsys::ofstream fout(destination.c_str(),
std::ios::out | std::ios::trunc | std::ios::binary);
-#endif
if (!fout) {
return false;
}
diff --git a/Source/kwsys/Terminal.c b/Source/kwsys/Terminal.c
index 4dd2461..c9515ee 100644
--- a/Source/kwsys/Terminal.c
+++ b/Source/kwsys/Terminal.c
@@ -172,6 +172,14 @@ static int kwsysTerminalStreamIsVT100(FILE* stream, int default_vt100,
}
}
+ /* GNU make 4.1+ may tell us that its output is destined for a TTY. */
+ {
+ const char* termout = getenv("MAKE_TERMOUT");
+ if (termout && *termout != '\0') {
+ return 1;
+ }
+ }
+
/* If running inside emacs the terminal is not VT100. Some emacs
seem to claim the TERM is xterm even though they do not support
VT100 escapes. */