This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +822
-1
lines changed Expand file tree Collapse file tree 4 files changed +822
-1
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ message(STATUS "Found ATen.so file: ${ATEN_LIBRARIES}")
225
225
################################################################################
226
226
# use locally generated C++ bindings
227
227
include_directories (AFTER ${PROJECT_SOURCE_DIR} /isl_interface/include )
228
+ include_directories (AFTER ${CMAKE_CURRENT_BINARY_DIR} /isl_interface/include )
228
229
include_directories (AFTER ${PROJECT_SOURCE_DIR} /third-party/islpp/include )
229
230
include_directories (AFTER ${CMAKE_CURRENT_BINARY_DIR} /third-party/islpp/include )
230
231
add_subdirectory (external/isl )
Original file line number Diff line number Diff line change @@ -106,6 +106,23 @@ add_custom_command(
106
106
COMMAND cat ${ISL_DIR} /cpp/cpp.h.bot >> ${ISL_CPP_H} || exit 1
107
107
DEPENDS extract_isl_interface
108
108
)
109
+
110
+ add_executable (generate_template_isl generate_template_isl.cc )
111
+
112
+ find_program (CLANG_FORMAT_BIN clang-format PATHS ${CLANG_PREFIX}
113
+ PATH_SUFFIXES bin
114
+ NO_DEFAULT_PATH )
115
+
116
+ SET (ISL_TEMPLATE_CPP_H "${CMAKE_CURRENT_BINARY_DIR} /include/isl/template_cpp.h" )
117
+ add_custom_command (
118
+ OUTPUT ${ISL_TEMPLATE_CPP_H}
119
+ DEPENDS ${ISL_CPP_H}
120
+ DEPENDS generate_template_isl
121
+ COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR} /include/isl
122
+ COMMAND generate_template_isl < ${ISL_CPP_H} > ${ISL_TEMPLATE_CPP_H}
123
+ COMMAND ${CLANG_FORMAT_BIN} -i ${ISL_TEMPLATE_CPP_H}
124
+ )
125
+
109
126
# generate_isl_cpp_h is the dependency that should be used
110
127
# by code that depends on the isl C++ bindings.
111
- add_custom_target (generate_isl_cpp_h DEPENDS ${ISL_CPP_H} )
128
+ add_custom_target (generate_isl_cpp_h DEPENDS ${ISL_CPP_H} ${ISL_TEMPLATE_CPP_H} )
You can’t perform that action at this time.
0 commit comments