Commit 4799f622 by Andrei Polushin Committed by GitHub

cmake: make `random_mocking_bit_gen` library public. (#1084)

An external project may depend on an Abseil `TESTONLY` library like
`absl::random_mocking_bit_gen`.  Such a library should not be excluded
from build when Abseil's own tests are not built.

fixes #997
parent 294166fc
...@@ -83,7 +83,8 @@ function(absl_cc_library) ...@@ -83,7 +83,8 @@ function(absl_cc_library)
${ARGN} ${ARGN}
) )
if(ABSL_CC_LIB_TESTONLY AND NOT (BUILD_TESTING AND ABSL_BUILD_TESTING)) if(NOT ABSL_CC_LIB_PUBLIC AND ABSL_CC_LIB_TESTONLY AND
NOT (BUILD_TESTING AND ABSL_BUILD_TESTING))
return() return()
endif() endif()
......
...@@ -121,6 +121,7 @@ absl_cc_library( ...@@ -121,6 +121,7 @@ absl_cc_library(
absl::variant absl::variant
GTest::gmock GTest::gmock
GTest::gtest GTest::gtest
PUBLIC
TESTONLY TESTONLY
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment