diff options
author | James Zern <jzern@google.com> | 2021-03-12 11:03:03 -0800 |
---|---|---|
committer | James Zern <jzern@google.com> | 2021-03-12 11:23:59 -0800 |
commit | 8236d9b8fee5b9cb8b30fe3d95a7ad288a62e6f7 (patch) | |
tree | f26f78d2c36b8ac3e28ba9a23aa75ea1f9232c92 | |
parent | 566a1e09ecf22d315eaaf8992287a044629afc08 (diff) | |
download | libwebm-8236d9b8fee5b9cb8b30fe3d95a7ad288a62e6f7.tar.gz |
use -std=gnu++11 under cygwin & msys2
this is a quick fix for these targets using the path added in:
9f23fbc Fix compilation with MinGW32
the side effect is that it will enable newer POSIX functions like fdopen
/ rand_r. setting _POSIX_C_SOURCE directly might be a more robust
solution as suggested in https://crbug.com/webm/1708.
Change-Id: I9ada1de847ca9bd23f0972b5ad8ba425efe08f68
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9fa5a53..a83d23b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,8 @@ option(ENABLE_IWYU "Enables include-what-you-use support." OFF) option(ENABLE_WERROR "Enable warnings as errors." OFF) option(ENABLE_WEBM_PARSER "Enables new parser API." OFF) -if(WIN32) +if(WIN32 OR CYGWIN OR MSYS) + # Allow use of rand_r() / fdopen() and other POSIX functions. require_cxx_flag_nomsvc("-std=gnu++11") else() require_cxx_flag_nomsvc("-std=c++11") |