[Cmake-commits] CMake branch, next, updated. v3.7.2-1311-g5e08acc
Brad King
brad.king at kitware.com
Mon Feb 6 13:10:26 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 5e08acc89b9b28ffdab4eadc379aa9a346bd841d (commit)
via c2645e1979f83b1550d977cee0cdb80122daf8e0 (commit)
via 95983ed8453f9167077821aea347ba1a87e92eac (commit)
from 4d505256b3e3b787f701e84717d1076a0e87ae22 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5e08acc89b9b28ffdab4eadc379aa9a346bd841d
commit 5e08acc89b9b28ffdab4eadc379aa9a346bd841d
Merge: 4d50525 c2645e1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 6 13:10:20 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 6 13:10:20 2017 -0500
Merge topic 'update-kwsys' into next
c2645e19 Merge branch 'upstream-KWSys' into update-kwsys
95983ed8 KWSys 2017-02-06 (ef673998)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c2645e1979f83b1550d977cee0cdb80122daf8e0
commit c2645e1979f83b1550d977cee0cdb80122daf8e0
Merge: 0f4dae0 95983ed
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 6 13:01:40 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 6 13:01:40 2017 -0500
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2017-02-06 (ef673998)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95983ed8453f9167077821aea347ba1a87e92eac
commit 95983ed8453f9167077821aea347ba1a87e92eac
Author: KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Mon Feb 6 10:00:05 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 6 13:01:39 2017 -0500
KWSys 2017-02-06 (ef673998)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit ef6739982f686648ef5ae6902aaf5fbaad891bce (master).
Upstream Shortlog
-----------------
Ben Boeckel (1):
8d8c86b5 testConsoleBuf: tighten the check for the /utf-8 flag
Gregor Jasny (1):
d6b87625 SystemTools: Add helper function to check for FIFO file type
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4fe8a7..de68118 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -946,7 +946,7 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
testConsoleBuf
)
IF("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" AND
- NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0")
+ CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "19.0.23506")
set_property(SOURCE testConsoleBuf.cxx testConsoleBufChild.cxx PROPERTY COMPILE_FLAGS /utf-8)
ENDIF()
SET_PROPERTY(SOURCE testConsoleBuf.cxx APPEND PROPERTY COMPILE_DEFINITIONS
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 97dd4ae..8c82ec1 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -3067,6 +3067,28 @@ bool SystemTools::FileIsSymlink(const std::string& name)
#endif
}
+bool SystemTools::FileIsFIFO(const std::string& name)
+{
+#if defined(_WIN32)
+ HANDLE hFile =
+ CreateFileW(Encoding::ToWide(name).c_str(), GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
+ if (hFile == INVALID_HANDLE_VALUE) {
+ return false;
+ }
+ const DWORD type = GetFileType(hFile);
+ CloseHandle(hFile);
+ return type == FILE_TYPE_PIPE;
+#else
+ struct stat fs;
+ if (lstat(name.c_str(), &fs) == 0) {
+ return S_ISFIFO(fs.st_mode);
+ } else {
+ return false;
+ }
+#endif
+}
+
#if defined(_WIN32) && !defined(__CYGWIN__)
bool SystemTools::CreateSymlink(const std::string&, const std::string&)
{
diff --git a/SystemTools.hxx.in b/SystemTools.hxx.in
index f3d06fe..7a5256b 100644
--- a/SystemTools.hxx.in
+++ b/SystemTools.hxx.in
@@ -654,6 +654,11 @@ public:
static bool FileIsSymlink(const std::string& name);
/**
+ * Return true if the file is a FIFO
+ */
+ static bool FileIsFIFO(const std::string& name);
+
+ /**
* Return true if the file has a given signature (first set of bytes)
*/
static bool FileHasSignature(const char* filename, const char* signature,
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/CMakeLists.txt | 2 +-
Source/kwsys/SystemTools.cxx | 22 ++++++++++++++++++++++
Source/kwsys/SystemTools.hxx.in | 5 +++++
3 files changed, 28 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list