This CL updates the cmake files to use go run directly.
Instead of using the tools/run script this CL updates CMake
to directly invoke go run. This should work around issues
with multiple writers of the gen binary and fixup windows issues.
Change-Id: Ie27f45a1d132e9ec100cad709bb92da8558b4fb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108045
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt
index ff4a84d..8049b3c 100644
--- a/src/tint/CMakeLists.txt
+++ b/src/tint/CMakeLists.txt
@@ -509,8 +509,9 @@
${PROJECT_SOURCE_DIR}/src/tint/intrinsics.def
${CMAKE_CURRENT_SOURCE_DIR}/${TARGET}.tmpl
)
+ set(GEN_CMD ${PROJECT_SOURCE_DIR}/tools/golang/bin/go run ./tools/src/cmd/gen)
add_custom_command(
- COMMAND ./tools/run gen -o ${DAWN_BUILD_GEN_DIR} ${PROJECT_SOURCE_DIR}/src/tint/${TARGET}.tmpl
+ COMMAND ${GEN_CMD} -o ${DAWN_BUILD_GEN_DIR} ${PROJECT_SOURCE_DIR}/src/tint/${TARGET}.tmpl
DEPENDS ${IN}
OUTPUT ${DAWN_BUILD_GEN_DIR}/src/tint/${TARGET}
COMMENT "Tint: Generating files for ${TARGET}"