diff options
author | Ben Smith <binjimin@gmail.com> | 2017-06-23 19:25:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-23 19:25:32 -0700 |
commit | b2613e132d93372bd75c640dd4d7505a81f707f7 (patch) | |
tree | c5c529d46bc6439cdf4975aefcf186287a064054 /CMakeLists.txt | |
parent | 29e8e9ee0068b0f90f30c69c4f6c0c3fd30bf96e (diff) | |
download | wabt-b2613e132d93372bd75c640dd4d7505a81f707f7.tar.gz wabt-b2613e132d93372bd75c640dd4d7505a81f707f7.tar.bz2 wabt-b2613e132d93372bd75c640dd4d7505a81f707f7.zip |
Add color output in SourceErrorHandler (#517)
This is currently only supported where VT100 escape sequences work. We
assume that if `isatty` is true then color will be supported. This logic will
likely need to be improved, but this is a good start.
This PR also adds support for passing an environment variable to a test
via `ENV`. This is used to test the `FORCE_COLOR` environment variable.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ec0896f..1ae2b326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,10 @@ check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF) check_symbol_exists(sysconf "unistd.h" HAVE_SYSCONF) check_symbol_exists(strcasecmp "strings.h" HAVE_STRCASECMP) +if (WIN32) + check_symbol_exists(ENABLE_VIRTUAL_TERMINAL_PROCESSING "windows.h" HAVE_WIN32_VT100) +endif () + if (EMSCRIPTEN) set(SIZEOF_SSIZE_T 4) set(SIZEOF_SIZE_T 4) @@ -254,6 +258,7 @@ add_library(libwabt STATIC src/resolve-names.cc src/binary.cc + src/color.cc src/common.cc src/config.cc src/literal.cc |