[PATCH] D37644: [CMake][runtimes] Use variables rather than ":" delimiters
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 26 20:19:32 PDT 2018
This revision was automatically updated to reflect the committed changes.
phosek marked an inline comment as done.
Closed by commit rL335703: [CMake] Use variables rather than ":" delimiters (authored by phosek, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D37644?vs=127749&id=152998#toc
Repository:
rL LLVM
https://reviews.llvm.org/D37644
Files:
llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
llvm/trunk/runtimes/CMakeLists.txt
Index: llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -231,16 +231,13 @@
# Add top-level targets
foreach(target ${ARG_EXTRA_TARGETS})
- string(REPLACE ":" ";" target_list ${target})
- list(GET target_list 0 target)
- list(LENGTH target_list target_list_len)
- if(${target_list_len} GREATER 1)
- list(GET target_list 1 target_name)
+ if(DEFINED ${target})
+ set(external_target "${${target}}")
else()
- set(target_name "${target}")
+ set(external_target "${target}")
endif()
- llvm_ExternalProject_BuildCmd(build_runtime_cmd ${target} ${BINARY_DIR})
- add_custom_target(${target_name}
+ llvm_ExternalProject_BuildCmd(build_runtime_cmd ${external_target} ${BINARY_DIR})
+ add_custom_target(${target}
COMMAND ${build_runtime_cmd}
DEPENDS ${name}-configure
WORKING_DIRECTORY ${BINARY_DIR}
Index: llvm/trunk/runtimes/CMakeLists.txt
===================================================================
--- llvm/trunk/runtimes/CMakeLists.txt
+++ llvm/trunk/runtimes/CMakeLists.txt
@@ -402,17 +402,19 @@
endif()
foreach(runtime_name ${runtime_names})
- list(APPEND ${name}_extra_targets
- "${runtime_name}:${runtime_name}-${name}"
- "install-${runtime_name}:install-${runtime_name}-${name}"
- "install-${runtime_name}-stripped:install-${runtime_name}-${name}-stripped")
+ set(${runtime_name}-${name} ${runtime_name})
+ set(install-${runtime_name}-${name} install-${runtime_name})
+ set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped)
+ list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped)
if(LLVM_INCLUDE_TESTS)
- list(APPEND ${name}_test_targets "check-${runtime_name}:check-${runtime_name}-${name}")
+ set(check-${runtime_name}-${name} check-${runtime_name} )
+ list(APPEND ${name}_test_targets check-${runtime_name}-${name})
endif()
endforeach()
foreach(target_name IN LISTS SUB_COMPONENTS SUB_INSTALL_TARGETS)
- list(APPEND ${name}_extra_targets "${target_name}:${target_name}-${name}")
+ set(${target_name}-${name} ${target_name})
+ list(APPEND ${name}_extra_targets ${target_name}-${name})
endforeach()
foreach(component ${LLVM_RUNTIME_DISTRIBUTION_COMPONENTS})
@@ -424,12 +426,13 @@
endforeach()
if(LLVM_INCLUDE_TESTS)
- list(APPEND ${name}_test_targets
- "runtimes-test-depends:runtimes-test-depends-${name}"
- "check-runtimes:check-runtimes-${name}")
+ set(runtimes-test-depends-${name} runtimes-test-depends)
+ set(check-runtimes-${name} check-runtimes)
+ list(APPEND ${name}_test_targets runtimes-test-depends-${name} check-runtimes-${name})
foreach(target_name IN LISTS SUB_CHECK_TARGETS)
- list(APPEND ${name}_test_targets "${target_name}:${target_name}-${name}")
- list(APPEND test_targets "${target_name}-${name}")
+ set(${target_name}-${name} ${target_name})
+ list(APPEND ${name}_test_targets ${target_name}-${name})
+ list(APPEND test_targets ${target_name}-${name})
endforeach()
set(test_targets "${test_targets}" PARENT_SCOPE)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37644.152998.patch
Type: text/x-patch
Size: 3477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180627/17950553/attachment.bin>
More information about the llvm-commits
mailing list