From 6dbddd32b053084754a0be210051b932d74b181d Mon Sep 17 00:00:00 2001 From: Adam Badura Date: Sun, 11 Aug 2019 21:10:06 +0200 Subject: Use -Wa,-mbig-obj for Cygwin/MinGW always --- googlemock/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'googlemock/CMakeLists.txt') diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index f75ec45d..d32b70b5 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -150,6 +150,14 @@ $env:Path = \"$project_bin;$env:Path\" & $args") endif() + if (MINGW OR CYGWIN) + if (CMAKE_VERSION VERSION_LESS "2.8.12") + add_compile_options("-Wa,-mbig-obj") + else() + add_definitions("-Wa,-mbig-obj") + endif() + endif() + ############################################################ # C++ tests built with standard compiler flags. @@ -162,9 +170,6 @@ $env:Path = \"$project_bin;$env:Path\" cxx_test(gmock-generated-matchers_test gmock_main) cxx_test(gmock-internal-utils_test gmock_main) cxx_test(gmock-matchers_test gmock_main) - if (MINGW OR CYGWIN) - target_compile_options(gmock-matchers_test PRIVATE "-Wa,-mbig-obj") - endif() cxx_test(gmock-more-actions_test gmock_main) cxx_test(gmock-nice-strict_test gmock_main) cxx_test(gmock-port_test gmock_main) -- cgit v1.2.3