@@ -290,45 +290,6 @@ else()
290
290
endif ()
291
291
endif ()
292
292
293
- # Stage all headers in the include directory in the build dir.
294
- file (GLOB public_headers ${LLDB_SOURCE_DIR} /include/lldb/API/*.h )
295
- set (lldb_header_staging_dir ${CMAKE_BINARY_DIR} /include/lldb )
296
- file (GLOB root_public_headers ${LLDB_SOURCE_DIR} /include/lldb/lldb-*.h )
297
- file (GLOB root_private_headers ${LLDB_SOURCE_DIR} /include/lldb/lldb-private*.h )
298
- list (REMOVE_ITEM root_public_headers ${root_private_headers} )
299
-
300
- find_program (unifdef_EXECUTABLE unifdef )
301
-
302
- foreach (header
303
- ${public_headers}
304
- ${generated_public_headers}
305
- ${root_public_headers} )
306
- get_filename_component (basename ${header} NAME )
307
- set (staged_header ${lldb_header_staging_dir} /${basename} )
308
-
309
- if (unifdef_EXECUTABLE )
310
- # unifdef returns 0 when the file is unchanged and 1 if something was changed.
311
- # That means if we successfully remove SWIG code, the build system believes
312
- # that the command has failed and stops. This is undesirable.
313
- set (copy_command ${unifdef_EXECUTABLE} -USWIG -o ${staged_header} ${header} || (exit 0 ))
314
- else ()
315
- set (copy_command ${CMAKE_COMMAND} -E copy ${header} ${staged_header} )
316
- endif ()
317
-
318
- add_custom_command (
319
- DEPENDS ${header} OUTPUT ${staged_header}
320
- COMMAND ${copy_command}
321
- COMMENT "LLDB headers: stage LLDB headers in include directory" )
322
-
323
- list (APPEND lldb_staged_headers ${staged_header} )
324
- endforeach ()
325
-
326
- add_custom_command (TARGET liblldb POST_BUILD
327
- COMMAND ${LLDB_SOURCE_DIR} /scripts/version-header-fix.py ${LLDB_SOURCE_DIR} /include/lldb/lldb-defines.h ${lldb_header_staging_dir} /lldb-defines.h ${LLDB_VERSION_MAJOR} ${LLDB_VERSION_MINOR} ${LLDB_VERSION_PATCH}
328
- )
329
- add_custom_target (liblldb-header-staging DEPENDS ${lldb_staged_headers} )
330
- add_dependencies (liblldb liblldb-header-staging )
331
-
332
293
if (LLDB_BUILD_FRAMEWORK )
333
294
include (LLDBFramework )
334
295
0 commit comments