@@ -240,28 +240,6 @@ function(add_compiler_rt_runtime name type)
240
240
set_target_properties (${LIB_PARENT_TARGET} PROPERTIES
241
241
FOLDER "Compiler-RT Misc" )
242
242
endif ()
243
- if (NOT TARGET install -${LIB_PARENT_TARGET} )
244
- # The parent install target specifies the parent component to scrape up
245
- # anything not installed by the individual install targets, and to handle
246
- # installation when running the multi-configuration generators.
247
- add_custom_target (install -${LIB_PARENT_TARGET}
248
- DEPENDS ${LIB_PARENT_TARGET}
249
- COMMAND "${CMAKE_COMMAND} "
250
- -DCMAKE_INSTALL_COMPONENT=${LIB_PARENT_TARGET}
251
- -P "${CMAKE_BINARY_DIR} /cmake_install.cmake" )
252
- add_custom_target (install -${LIB_PARENT_TARGET} -stripped
253
- DEPENDS ${LIB_PARENT_TARGET}
254
- COMMAND "${CMAKE_COMMAND} "
255
- -DCMAKE_INSTALL_COMPONENT=${LIB_PARENT_TARGET}
256
- -DCMAKE_INSTALL_DO_STRIP=1
257
- -P "${CMAKE_BINARY_DIR} /cmake_install.cmake" )
258
- set_target_properties (install -${LIB_PARENT_TARGET} PROPERTIES
259
- FOLDER "Compiler-RT Misc" )
260
- set_target_properties (install -${LIB_PARENT_TARGET} -stripped PROPERTIES
261
- FOLDER "Compiler-RT Misc" )
262
- add_dependencies (install -compiler-rt install -${LIB_PARENT_TARGET} )
263
- add_dependencies (install -compiler-rt-stripped install -${LIB_PARENT_TARGET} -stripped)
264
- endif ()
265
243
endif ()
266
244
267
245
foreach (libname ${libnames} )
@@ -352,27 +330,12 @@ function(add_compiler_rt_runtime name type)
352
330
endif ()
353
331
endif ()
354
332
355
- # We only want to generate per-library install targets if you aren't using
356
- # an IDE because the extra targets get cluttered in IDEs.
357
- if (NOT CMAKE_CONFIGURATION_TYPES )
358
- add_custom_target (install -${libname}
359
- DEPENDS ${libname}
360
- COMMAND "${CMAKE_COMMAND} "
361
- -DCMAKE_INSTALL_COMPONENT=${libname}
362
- -P "${CMAKE_BINARY_DIR} /cmake_install.cmake" )
363
- add_custom_target (install -${libname} -stripped
364
- DEPENDS ${libname}
365
- COMMAND "${CMAKE_COMMAND} "
366
- -DCMAKE_INSTALL_COMPONENT=${libname}
367
- -DCMAKE_INSTALL_DO_STRIP=1
368
- -P "${CMAKE_BINARY_DIR} /cmake_install.cmake" )
369
- # If you have a parent target specified, we bind the new install target
370
- # to the parent install target.
371
- if (LIB_PARENT_TARGET)
372
- add_dependencies (install -${LIB_PARENT_TARGET} install -${libname} )
373
- add_dependencies (install -${LIB_PARENT_TARGET} -stripped install -${libname} -stripped)
374
- endif ()
333
+ set (parent_target_arg)
334
+ if (LIB_PARENT_TARGET)
335
+ set (parent_target_arg PARENT_TARGET ${LIB_PARENT_TARGET} )
375
336
endif ()
337
+ add_compiler_rt_install_targets(${libname} ${parent_target_arg} )
338
+
376
339
if (APPLE )
377
340
set_target_properties (${libname} PROPERTIES
378
341
OSX_ARCHITECTURES "${LIB_ARCHS_${libname} }" )
0 commit comments