File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,13 @@ macro (google_cloud_cpp_enable_cleanup)
403403 set (GOOGLE_CLOUD_CPP_ENABLE_REST ON )
404404 endif ()
405405
406+ # We need the REST libraries for the full suite of samples.
407+ if (NOT GOOGLE_CLOUD_CPP_ENABLE_REST
408+ AND BUILD_TESTING
409+ AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
410+ set (GOOGLE_CLOUD_CPP_ENABLE_REST ON )
411+ endif ()
412+
406413 list (REMOVE_DUPLICATES GOOGLE_CLOUD_CPP_ENABLE)
407414endmacro ()
408415
Original file line number Diff line number Diff line change @@ -52,11 +52,6 @@ mark_as_advanced(GOOGLE_CLOUD_CPP_BUILD_METADATA)
5252
5353include ("${CMAKE_CURRENT_SOURCE_DIR} /google_cloud_cpp_common.cmake" )
5454
55- # We need the REST libraries for the full suite of samples.
56- if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
57- set (GOOGLE_CLOUD_CPP_ENABLE_REST ON )
58- endif ()
59-
6055add_subdirectory (testing_util)
6156
6257if (GOOGLE_CLOUD_CPP_ENABLE_GRPC)
@@ -73,14 +68,11 @@ if (GOOGLE_CLOUD_CPP_ENABLE_REST AND GOOGLE_CLOUD_CPP_ENABLE_GRPC)
7368 )
7469endif ()
7570
76- if (universe_domain IN_LIST GOOGLE_CLOUD_CPP_ENABLE)
77- include (
78- "${CMAKE_CURRENT_SOURCE_DIR} /google_cloud_cpp_universe_domain.cmake" )
79- add_subdirectory (universe_domain)
80- endif ()
81-
82- # We need the universe_domain library for the full suite of samples.
83- if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
71+ # We need the universe_domain library for the full suite of samples if it isn't
72+ # already enabled.
73+ if (universe_domain IN_LIST GOOGLE_CLOUD_CPP_ENABLE
74+ OR BUILD_TESTING
75+ AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS)
8476 include (
8577 "${CMAKE_CURRENT_SOURCE_DIR} /google_cloud_cpp_universe_domain.cmake" )
8678 add_subdirectory (universe_domain)
You can’t perform that action at this time.
0 commit comments