summaryrefslogtreecommitdiffstats
path: root/googlemock/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'googlemock/CMakeLists.txt')
-rw-r--r--googlemock/CMakeLists.txt19
1 files changed, 13 insertions, 6 deletions
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index 3e72d75..d32b70b 100644
--- a/googlemock/CMakeLists.txt
+++ b/googlemock/CMakeLists.txt
@@ -1,4 +1,7 @@
########################################################################
+# Note: CMake support is community-based. The maintainers do not use CMake
+# internally.
+#
# CMake build script for Google Mock.
#
# To run the tests for Google Mock itself on Linux, use 'make test' or
@@ -49,7 +52,7 @@ endif()
# targets to the current scope. We are placing Google Test's binary
# directory in a subdirectory of our own as VC compilation may break
# if they are the same (the default).
-add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/gtest")
+add_subdirectory("${gtest_dir}" "${gmock_BINARY_DIR}/${gtest_dir}")
# These commands only run if this is the main project
@@ -139,7 +142,7 @@ if (gmock_build_tests)
"$project_bin = \"${CMAKE_BINARY_DIR}/bin/$<CONFIG>\"
$env:Path = \"$project_bin;$env:Path\"
& $args")
- elseif (MINGW)
+ elseif (MINGW OR CYGWIN)
file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/RunTest.ps1"
CONTENT
"$project_bin = (cygpath --windows ${CMAKE_BINARY_DIR}/bin)
@@ -147,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.
@@ -156,13 +167,9 @@ $env:Path = \"$project_bin;$env:Path\"
cxx_test(gmock-function-mocker_test gmock_main)
cxx_test(gmock-generated-actions_test gmock_main)
cxx_test(gmock-generated-function-mockers_test gmock_main)
- cxx_test(gmock-generated-internal-utils_test gmock_main)
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)
- 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)