Skip to content

Commit eb06125

Browse files
authored
[libc][NFC] Eliminate the internal header library target. (#65837)
The internal header library target with name suffix `.__header_library` has been removed as it serves no purpose now. It was added to make older versions of CMake happy.
1 parent f3c2a3d commit eb06125

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

libc/cmake/modules/LLVMLibCLibraryRules.cmake

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -175,27 +175,19 @@ function(create_header_library fq_target_name)
175175
endforeach()
176176
endif()
177177
endif()
178-
set(interface_target_name "${fq_target_name}.__header_library__")
179178

180-
add_library(${interface_target_name} INTERFACE)
181-
target_sources(${interface_target_name} INTERFACE ${FULL_HDR_PATHS})
179+
add_library(${fq_target_name} INTERFACE)
180+
target_sources(${fq_target_name} INTERFACE ${FULL_HDR_PATHS})
182181
if(ADD_HEADER_DEPENDS)
183-
add_dependencies(${interface_target_name} ${ADD_HEADER_DEPENDS})
182+
add_dependencies(${fq_target_name} ${ADD_HEADER_DEPENDS})
184183
endif()
185-
set_target_properties(
186-
${interface_target_name}
187-
PROPERTIES
188-
INTERFACE_FLAGS "${ADD_HEADER_FLAGS}"
189-
)
190184
if(ADD_HEADER_COMPILE_OPTIONS)
191-
target_compile_options(${interface_target_name} INTERFACE ${ADD_HEADER_COMPILE_OPTIONS})
185+
target_compile_options(${fq_target_name} INTERFACE ${ADD_HEADER_COMPILE_OPTIONS})
192186
endif()
193-
194-
add_custom_target(${fq_target_name})
195-
add_dependencies(${fq_target_name} ${interface_target_name})
196187
set_target_properties(
197188
${fq_target_name}
198189
PROPERTIES
190+
INTERFACE_FLAGS "${ADD_HEADER_FLAGS}"
199191
TARGET_TYPE "${HDR_LIBRARY_TARGET_TYPE}"
200192
DEPS "${ADD_HEADER_DEPENDS}"
201193
FLAGS "${ADD_HEADER_FLAGS}"

0 commit comments

Comments
 (0)