diff options
author | Ivan Shynkarenka <chronoxor@gmail.com> | 2018-05-02 02:51:08 +0300 |
---|---|---|
committer | Ivan Shynkarenka <chronoxor@gmail.com> | 2018-05-02 03:01:10 +0300 |
commit | f80a886bc157a8b0af743c861ba5413614dd97c1 (patch) | |
tree | 0bf00fb8e46d3df4de25453a1951cc32abbf75a5 /cmake | |
parent | 05c2d01b61520dd801a2d1a65a28164de7d92bd0 (diff) |
Cygwin build failed
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 02429fb1..02174e96 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -16,9 +16,13 @@ endif() project(protobuf C CXX) # Add c++11 flags -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS OFF) +if (CYGWIN) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") +else() + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) +endif() # Options option(protobuf_BUILD_TESTS "Build tests" ON) @@ -163,7 +167,7 @@ if (MSVC) string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR}) configure_file(extract_includes.bat.in extract_includes.bat) - + # Suppress linker warnings about files with no symbols defined. set(CMAKE_STATIC_LINKER_FLAGS /ignore:4221) endif (MSVC) |