Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
822c6201
Unverified
Commit
822c6201
authored
Jan 15, 2018
by
Gennadiy Civil
Committed by
GitHub
Jan 15, 2018
Browse files
Merge branch 'master' into master
parents
da1f7fe1
051fe2fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
23 deletions
+40
-23
googlemock/CMakeLists.txt
googlemock/CMakeLists.txt
+40
-23
No files found.
googlemock/CMakeLists.txt
View file @
822c6201
...
@@ -88,16 +88,23 @@ endif()
...
@@ -88,16 +88,23 @@ endif()
# Google Mock libraries. We build them using more strict warnings than what
# Google Mock libraries. We build them using more strict warnings than what
# are used for other targets, to ensure that Google Mock can be compiled by
# are used for other targets, to ensure that Google Mock can be compiled by
# a user aggressive about warnings.
# a user aggressive about warnings.
cxx_library
(
gmock
if
(
MSVC
)
"
${
cxx_strict
}
"
cxx_library
(
gmock
"
${
gtest_dir
}
/src/gtest-all.cc"
"
${
cxx_strict
}
"
src/gmock-all.cc
)
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc
)
cxx_library
(
gmock_main
"
${
cxx_strict
}
"
cxx_library
(
gmock_main
"
${
gtest_dir
}
/src/gtest-all.cc"
"
${
cxx_strict
}
"
src/gmock-all.cc
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock_main.cc
)
src/gmock-all.cc
src/gmock_main.cc
)
else
()
cxx_library
(
gmock
"
${
cxx_strict
}
"
src/gmock-all.cc
)
target_link_libraries
(
gmock gtest
)
cxx_library
(
gmock_main
"
${
cxx_strict
}
"
src/gmock_main.cc
)
target_link_libraries
(
gmock_main gmock
)
endif
()
# If the CMake version supports it, attach header directory information
# If the CMake version supports it, attach header directory information
# to the targets for when we are part of a parent build (ie being pulled
# to the targets for when we are part of a parent build (ie being pulled
...
@@ -177,23 +184,33 @@ if (gmock_build_tests)
...
@@ -177,23 +184,33 @@ if (gmock_build_tests)
############################################################
############################################################
# C++ tests built with non-standard compiler flags.
# C++ tests built with non-standard compiler flags.
cxx_library
(
gmock_main_no_exception
"
${
cxx_no_exception
}
"
if
(
MSVC
)
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
cxx_library
(
gmock_main_no_exception
"
${
cxx_no_exception
}
"
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
cxx_library
(
gmock_main_no_rtti
"
${
cxx_no_rtti
}
"
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
if
(
NOT MSVC OR MSVC_VERSION LESS 1600
)
# 1600 is Visual Studio 2010.
cxx_library
(
gmock_main_no_rtti
"
${
cxx_no_rtti
}
"
# Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that
# conflict with our own definitions. Therefore using our own tuple does not
# work on those compilers.
cxx_library
(
gmock_main_use_own_tuple
"
${
cxx_use_own_tuple
}
"
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
cxx_test_with_flags
(
gmock_use_own_tuple_test
"
${
cxx_use_own_tuple
}
"
if
(
MSVC_VERSION LESS 1600
)
# 1600 is Visual Studio 2010.
gmock_main_use_own_tuple test/gmock-spec-builders_test.cc
)
# Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that
# conflict with our own definitions. Therefore using our own tuple does not
# work on those compilers.
cxx_library
(
gmock_main_use_own_tuple
"
${
cxx_use_own_tuple
}
"
"
${
gtest_dir
}
/src/gtest-all.cc"
src/gmock-all.cc src/gmock_main.cc
)
cxx_test_with_flags
(
gmock_use_own_tuple_test
"
${
cxx_use_own_tuple
}
"
gmock_main_use_own_tuple test/gmock-spec-builders_test.cc
)
endif
()
else
()
cxx_library
(
gmock_main_no_exception
"
${
cxx_no_exception
}
"
src/gmock_main.cc
)
target_link_libraries
(
gmock_main_no_exception gmock
)
cxx_library
(
gmock_main_no_rtti
"
${
cxx_no_rtti
}
"
src/gmock_main.cc
)
target_link_libraries
(
gmock_main_no_rtti gmock
)
cxx_library
(
gmock_main_use_own_tuple
"
${
cxx_use_own_tuple
}
"
src/gmock_main.cc
)
target_link_libraries
(
gmock_main_use_own_tuple gmock
)
endif
()
endif
()
cxx_test_with_flags
(
gmock-more-actions_no_exception_test
"
${
cxx_no_exception
}
"
cxx_test_with_flags
(
gmock-more-actions_no_exception_test
"
${
cxx_no_exception
}
"
gmock_main_no_exception test/gmock-more-actions_test.cc
)
gmock_main_no_exception test/gmock-more-actions_test.cc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment