CMake: Add a flag to control whether to built tint_unittests

Bug: dawn:605
Change-Id: I03860c263746939112e03544fbc3579631423c37
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35282
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-12-09 14:47:30 +00:00
committed by Commit Bot service account
parent 350330bb46
commit f3717fa249
3 changed files with 369 additions and 366 deletions

View File

@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (NOT TARGET gmock)
if (${TINT_BUILD_TESTS} AND NOT TARGET gmock)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/googletest EXCLUDE_FROM_ALL)
endif()