mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[CMake] Use variables rather than ":" delimiters
This is a more idiomatic CMake. Differential Revision: https://reviews.llvm.org/D37644 llvm-svn: 335703
This commit is contained in:
parent
191b4b2f66
commit
4f4061d600
@ -231,16 +231,13 @@ function(llvm_ExternalProject_Add name source_dir)
|
||||
|
||||
# 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}
|
||||
|
@ -402,17 +402,19 @@ else() # if this is included from LLVM's CMake
|
||||
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 @@ else() # if this is included from LLVM's CMake
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user