summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/kwsys/ConsoleBuf.hxx.in16
-rw-r--r--Tests/CompileFeatures/cxx_right_angle_brackets.cpp4
-rwxr-xr-xUtilities/Scripts/clang-format.bash1
4 files changed, 17 insertions, 6 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index c656fba..ea6bdad 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 7)
-set(CMake_VERSION_PATCH 20161025)
+set(CMake_VERSION_PATCH 20161026)
#set(CMake_VERSION_RC 1)
diff --git a/Source/kwsys/ConsoleBuf.hxx.in b/Source/kwsys/ConsoleBuf.hxx.in
index 8aeeda1..2496b45 100644
--- a/Source/kwsys/ConsoleBuf.hxx.in
+++ b/Source/kwsys/ConsoleBuf.hxx.in
@@ -239,8 +239,12 @@ namespace @KWSYS_NAMESPACE@
m_activeInputCodepage = input_file_codepage;
break;
case FILE_TYPE_CHAR:
- m_isConsoleInput = true;
- break;
+ // Check for actual console.
+ DWORD consoleMode;
+ m_isConsoleInput = GetConsoleMode(m_hInput, &consoleMode) == 0 ? false : true;
+ if (m_isConsoleInput) {
+ break;
+ }
case FILE_TYPE_PIPE:
m_activeInputCodepage = input_pipe_codepage;
break;
@@ -259,8 +263,12 @@ namespace @KWSYS_NAMESPACE@
m_activeOutputCodepage = output_file_codepage;
break;
case FILE_TYPE_CHAR:
- m_isConsoleOutput = true;
- break;
+ // Check for actual console.
+ DWORD consoleMode;
+ m_isConsoleOutput = GetConsoleMode(m_hOutput, &consoleMode) == 0 ? false : true;
+ if (m_isConsoleOutput) {
+ break;
+ }
case FILE_TYPE_PIPE:
m_activeOutputCodepage = output_pipe_codepage;
break;
diff --git a/Tests/CompileFeatures/cxx_right_angle_brackets.cpp b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp
index 8f1b0ee..4d494b5 100644
--- a/Tests/CompileFeatures/cxx_right_angle_brackets.cpp
+++ b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp
@@ -7,6 +7,8 @@ struct A
void someFunc()
{
- A<A<int> > object;
+ /* clang-format off */
+ A<A<int>> object;
+ /* clang-format on */
(void)object;
}
diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash
index a7080fc..ad3b3a1 100755
--- a/Utilities/Scripts/clang-format.bash
+++ b/Utilities/Scripts/clang-format.bash
@@ -130,6 +130,7 @@ $git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
# Exclude manually-formatted sources (e.g. with long lines).
egrep -z -v '^Tests/PositionIndependentTargets/pic_test.h' |
+ egrep -z -v '^Tests/CompileFeatures/cxx_right_angle_brackets.cpp' |
# Exclude sources with encoding not suported by clang-format.
egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' |