File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -80,14 +80,6 @@ function(tablegen project ofn)
80
80
set (tblgen_change_flag "--write-if-changed" )
81
81
endif ()
82
82
83
- # With CMake 3.12 this can be reduced to:
84
- # get_directory_property(tblgen_includes "INCLUDE_DIRECTORIES")
85
- # list(TRANSFORM tblgen_includes PREPEND -I)
86
- set (tblgen_includes )
87
- get_directory_property (includes "INCLUDE_DIRECTORIES" )
88
- foreach (include ${includes} )
89
- list (APPEND tblgen_includes -I ${include} )
90
- endforeach ()
91
83
# We need both _TABLEGEN_TARGET and _TABLEGEN_EXE in the DEPENDS list
92
84
# (both the target and the file) to have .inc files rebuilt on
93
85
# a tablegen change, as cmake does not propagate file-level dependencies
@@ -97,6 +89,9 @@ function(tablegen project ofn)
97
89
# dependency twice in the result file when
98
90
# ("${${project}_TABLEGEN_TARGET}" STREQUAL "${${project}_TABLEGEN_EXE}")
99
91
# but lets us having smaller and cleaner code here.
92
+ get_directory_property (tblgen_includes INCLUDE_DIRECTORIES )
93
+ list (TRANSFORM tblgen_includes PREPEND -I )
94
+
100
95
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${ofn}
101
96
COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
102
97
${tblgen_includes}
You can’t perform that action at this time.
0 commit comments