Do not add third_party test targets in CMake build

This way, one can just run `ctest .` in the build directory and it will only
run Sandboxed API and Sandbox2 tests.

PiperOrigin-RevId: 321342543
Change-Id: I42537e64bfb3127dca00bd92a3f7b35ca64004d9
This commit is contained in:
Christian Blichmann 2020-07-15 05:31:25 -07:00 committed by Copybara-Service
parent 405cc00683
commit a574b66e99
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,7 @@ endif()
set(GFLAGS_IS_SUBPROJECT TRUE) set(GFLAGS_IS_SUBPROJECT TRUE)
set(GFLAGS_INSTALL_SHARED_LIBS FALSE) set(GFLAGS_INSTALL_SHARED_LIBS FALSE)
set(GFLAGS_BUILD_TESTING FALSE)
add_subdirectory("${CMAKE_BINARY_DIR}/gflags-src" add_subdirectory("${CMAKE_BINARY_DIR}/gflags-src"
"${CMAKE_BINARY_DIR}/gflags-build" EXCLUDE_FROM_ALL) "${CMAKE_BINARY_DIR}/gflags-build" EXCLUDE_FROM_ALL)

View File

@ -40,8 +40,12 @@ set(WITH_UNWIND OFF CACHE BOOL "" FORCE)
set(UNWIND_LIBRARY FALSE) set(UNWIND_LIBRARY FALSE)
set(HAVE_PWD_H FALSE) set(HAVE_PWD_H FALSE)
set(_glog_BUILD_TESTING ${BUILD_TESTING})
set(BUILD_TESTING FALSE)
add_subdirectory("${CMAKE_BINARY_DIR}/glog-src" add_subdirectory("${CMAKE_BINARY_DIR}/glog-src"
"${CMAKE_BINARY_DIR}/glog-build" EXCLUDE_FROM_ALL) "${CMAKE_BINARY_DIR}/glog-build" EXCLUDE_FROM_ALL)
set(BUILD_TESTING ${_glog_BUILD_TESTING})
set(_glog_BUILD_TESTING)
target_include_directories(glog PUBLIC target_include_directories(glog PUBLIC
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/gflags-build/include> $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/gflags-build/include>
) )