From 9cce16f8d44168ea67f506e586b6ee270f125ec7 Mon Sep 17 00:00:00 2001 From: Ivan Radanov Ivanov Date: Wed, 28 Feb 2024 14:46:15 +0900 Subject: [PATCH] Dep --- enzyme/Enzyme/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/enzyme/Enzyme/CMakeLists.txt b/enzyme/Enzyme/CMakeLists.txt index a55be9525bec..7d42aa7d8742 100644 --- a/enzyme/Enzyme/CMakeLists.txt +++ b/enzyme/Enzyme/CMakeLists.txt @@ -38,8 +38,13 @@ add_public_tablegen_target(BlasTAIncGen) add_public_tablegen_target(BlasDiffUseIncGen) set(LLVM_TARGET_DEFINITIONS Clang/include_utils.td) +# Need to explicitly set included files as dependencies +set(ARG_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/Runtime/MPFR.cpp" CACHE INTERNAL "deps") +# Cmake tablegen adds the current cmake dir to the include path and bazel adds +# the directory that contains the .td file, that's why we need the include here enzyme_tablegen(IncludeUtils.inc -gen-header-strings -I${CMAKE_CURRENT_SOURCE_DIR}/Clang/) add_public_tablegen_target(IncludeUtilsIncGen) +unset(ARG_DEPENDS) include_directories(${CMAKE_CURRENT_BINARY_DIR})