Honor SAPI_ENABLE_TESTS in examples

PiperOrigin-RevId: 259927061
Change-Id: I7ae2156630c60e54ba0d9933d03816d750db31f3
This commit is contained in:
Christian Blichmann 2019-07-25 05:11:32 -07:00 committed by Copybara-Service
parent ef7592cfdd
commit 1b93745d00

View File

@ -14,11 +14,12 @@
add_subdirectory(lib)
# sandboxed_api/examples/stringop:main_stringop
add_executable(main_stringop
if(SAPI_ENABLE_TESTS)
# sandboxed_api/examples/stringop:main_stringop
add_executable(main_stringop
main_stringop.cc
)
target_link_libraries(main_stringop PRIVATE
)
target_link_libraries(main_stringop PRIVATE
absl::memory
absl::strings
absl::time
@ -29,5 +30,6 @@ target_link_libraries(main_stringop PRIVATE
sapi::stringop_sapi
sapi::test_main
sapi::vars
)
gtest_discover_tests(main_stringop)
)
gtest_discover_tests(main_stringop)
endif()