Skip to content

Commit

Permalink
WIP deps
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed Feb 28, 2024
1 parent 7522bc6 commit 387e29c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion enzyme/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ gentbl(
)],
tblgen = ":enzyme-tblgen",
td_file = "Enzyme/Clang/include_utils.td",
td_srcs = ["Enzyme/Clang/include_utils.td"],
td_srcs = [
"Enzyme/Clang/include_utils.td",
"Enzyme/Runtime/MPFR.cpp",
],
deps = [
":enzyme-tblgen",
],
Expand Down
10 changes: 9 additions & 1 deletion enzyme/Enzyme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ add_public_tablegen_target(BlasTAIncGen)
add_public_tablegen_target(BlasDiffUseIncGen)

set(LLVM_TARGET_DEFINITIONS Clang/include_utils.td)
enzyme_tablegen(IncludeUtils.inc -gen-header-strings)
enzyme_tablegen(IncludeUtils.inc -gen-header-strings -I${CMAKE_CURRENT_SOURCE_DIR}/Clang/)
add_public_tablegen_target(IncludeUtilsIncGen)
# add_custom_target(RuntimeMPFRcpp
# OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/RuntimeMPFR.cpp"
# COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/Runtime/MPFR.cpp")

# add_custom_target(RuntimeMPFRcpp DEPENDS Runtime/MPFR.cpp)
# add_dependencies(IncludeUtilsIncGen RuntimeMPFRcpp)
#target_sources(IncludeUtilsIncGen INTERFACE Runtime/MPFR.cpp)
set_property(TARGET IncludeUtilsIncGen APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/Runtime/MPFR.cpp")

include_directories(${CMAKE_CURRENT_BINARY_DIR})

Expand Down
2 changes: 1 addition & 1 deletion enzyme/Enzyme/Clang/include_utils.td
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,4 @@ def : InlineHeader<"/enzymeroot/enzyme/enzyme", [{
#endif
}]>;

def : FileHeader<"/enzymeroot/enzyme/mpfr", "Runtime/MPFR.cpp">;
def : FileHeader<"/enzymeroot/enzyme/mpfr", "../Runtime/MPFR.cpp">;

0 comments on commit 387e29c

Please sign in to comment.