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)
${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()
endif()
......
......@@ -121,6 +121,7 @@ absl_cc_library(
absl::variant
GTest::gmock
GTest::gtest
PUBLIC
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