Skip to content

Commit

Permalink
Cygwin needs "-std=gnu++11" instead.
Browse files Browse the repository at this point in the history
Fixes #150.

Change-Id: Id067989ee58bc35c3f59a55b65f54f6e216166c1
Reviewed-on: https://code-review.googlesource.com/14570
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Jul 7, 2017
1 parent 8d17aba commit 971f917
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# CMake defaults to /W3, but some users like /W4 (or /Wall) and /WX,
# so we disable various warnings that aren't particularly helpful.
add_compile_options(/wd4100 /wd4201 /wd4456 /wd4457 /wd4702 /wd4815)
elseif(CYGWIN OR MINGW)
# See https://stackoverflow.com/questions/38139631 for details.
add_compile_options(-std=gnu++11)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-std=c++11)
endif()
Expand Down

0 comments on commit 971f917

Please sign in to comment.