mirror of
https://github.com/google/googletest.git
synced 2025-04-04 21:15:03 +00:00
Add GTEST_HAS_ABSL support and dependencies configuration for MSVC
* Added conditional compilation definitions for GTEST_HAS_ABSL in MSVC configuration. * Configured and linked Abseil and RE2 dependencies when GTEST_HAS_ABSL is enabled.
This commit is contained in:
parent
9ff2450a56
commit
688a2d9305
1 changed files with 20 additions and 0 deletions
|
@ -93,6 +93,26 @@ if (MSVC)
|
|||
"${gtest_dir}/src/gtest-all.cc"
|
||||
src/gmock-all.cc
|
||||
src/gmock_main.cc)
|
||||
|
||||
if(GTEST_HAS_ABSL)
|
||||
target_compile_definitions(gmock PUBLIC GTEST_HAS_ABSL=1)
|
||||
target_compile_definitions(gmock_main PUBLIC GTEST_HAS_ABSL=1)
|
||||
set(gmock_DEPENDENCIES
|
||||
absl::failure_signal_handler
|
||||
absl::stacktrace
|
||||
absl::symbolize
|
||||
absl::flags_parse
|
||||
absl::flags_reflection
|
||||
absl::flags_usage
|
||||
absl::strings
|
||||
absl::any
|
||||
absl::optional
|
||||
absl::variant
|
||||
re2::re2
|
||||
)
|
||||
target_link_libraries(gmock PUBLIC ${gmock_DEPENDENCIES})
|
||||
target_link_libraries(gmock_main PUBLIC ${gmock_DEPENDENCIES})
|
||||
endif ()
|
||||
else()
|
||||
cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
|
||||
target_link_libraries(gmock PUBLIC gtest)
|
||||
|
|
Loading…
Add table
Reference in a new issue