From 7fbd67a132eed0032e9c47b4bf53ef090a9a87e5 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 10 Dec 2020 14:33:31 +0000 Subject: [PATCH] Fix CMake build when TINT_BUILD_FUZZERS=1 The `libtint-fuzz` target needs to be defined before reference. Change-Id: I030f4b3b93a095bd353aa6cff402e351d5b77dca Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35381 Commit-Queue: dan sinclair Reviewed-by: dan sinclair --- src/CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3a48488e98..328c203040 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -363,13 +363,6 @@ if (${COMPILER_IS_LIKE_GNU}) endif() set_target_properties(libtint PROPERTIES OUTPUT_NAME "tint") -if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER}) - tint_spvtools_compile_options(libtint) - if (${TINT_BUILD_FUZZERS}) - tint_spvtools_compile_options(libtint-fuzz) - endif() -endif() - if (${TINT_BUILD_FUZZERS}) # Tint library with fuzzer instrumentation add_library(libtint-fuzz ${TINT_LIB_SRCS}) @@ -381,6 +374,13 @@ if (${TINT_BUILD_FUZZERS}) target_link_options(libtint-fuzz PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp) endif() +if(${TINT_BUILD_SPV_READER} OR ${TINT_BUILD_SPV_WRITER}) + tint_spvtools_compile_options(libtint) + if (${TINT_BUILD_FUZZERS}) + tint_spvtools_compile_options(libtint-fuzz) + endif() +endif() + if(${TINT_BUILD_TESTS}) set(TINT_TEST_SRCS ast/array_accessor_expression_test.cc