diff options
author | Adam Cozzette <acozzette@gmail.com> | 2018-07-31 13:25:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 13:25:22 -0700 |
commit | 3d62db3ecd5377025a458bca827ab4ca12d5c1f0 (patch) | |
tree | dd89f97b73b545c6f5e3d5abfbd22d15fb784700 | |
parent | 0f56f27ffc3a8317a13c1eb5dcec61de538a4fff (diff) | |
parent | a69dfe63bc26c12fd2786aec9239076997110315 (diff) | |
download | protobuf-3d62db3ecd5377025a458bca827ab4ca12d5c1f0.tar.gz protobuf-3d62db3ecd5377025a458bca827ab4ca12d5c1f0.tar.bz2 protobuf-3d62db3ecd5377025a458bca827ab4ca12d5c1f0.zip |
Merge pull request #4979 from ripopov/fix-tests-mingw-w64
tests: fix link failure and stack overflow on Mingw w64
-rw-r--r-- | cmake/tests.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/tests.cmake b/cmake/tests.cmake index f91567b8..603d7e95 100644 --- a/cmake/tests.cmake +++ b/cmake/tests.cmake @@ -206,6 +206,13 @@ endif() if(MINGW) set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing") + + # required for tests on MinGW Win64 + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,16777216") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj") + endif() + endif() add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files}) |