-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[google-cloud-cpp] Skip building mock libraries. (#39802)
- Loading branch information
1 parent
1b5f734
commit 3389f50
Showing
5 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index e1a1dc8..807f6e2 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -173,7 +173,7 @@ provided mocks to test code involving the Cloud C++ clients may wish to turn | ||
this flag off.]==] | ||
ON | ||
"NOT BUILD_TESTING" | ||
- ON) | ||
+ $<IF:$<BOOL:${BUILD_TESTING}>:OFF:ON>) | ||
mark_as_advanced(GOOGLE_CLOUD_CPP_WITH_MOCKS) | ||
|
||
# The examples use exception handling to simplify the code. Therefore they | ||
@@ -246,7 +246,7 @@ include(CTest) | ||
# used in the depends condition of the next option. | ||
include(EnableCxxExceptions) | ||
|
||
-if (BUILD_TESTING) | ||
+if (BUILD_TESTING OR GOOGLE_CLOUD_CPP_WITH_MOCKS) | ||
# Discover and add targets for the GTest::gtest and GTest::gmock libraries. | ||
include(FindGMockWithTargets) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters