Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion llvm/runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ function(runtime_register_target name)
cmake_parse_arguments(ARG "" "BASE_NAME" "DEPENDS;CMAKE_ARGS;EXTRA_ARGS" ${ARGN})
include(${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake OPTIONAL)
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${LLVM_BINARY_DIR}/runtimes/${name}/Components.cmake)
set(runtime_tests_enabled ${LLVM_INCLUDE_TESTS})

set(runtime_names ${RUNTIME_NAMES})
foreach(_name IN ITEMS ${ARG_BASE_NAME} ${name})
Expand Down Expand Up @@ -348,6 +349,9 @@ function(runtime_register_target name)
string(FIND "${variable_name}" "RUNTIMES_${extra_name}_" out)
if("${out}" EQUAL 0)
string(REPLACE "RUNTIMES_${extra_name}_" "" new_name ${variable_name})
if (new_name STREQUAL "LLVM_INCLUDE_TESTS")
set(runtime_tests_enabled ${${variable_name}})
endif()
if(new_name STREQUAL CACHE_FILES)
foreach(cache IN LISTS ${variable_name})
list(APPEND ${name}_extra_args -C ${cache})
Expand Down Expand Up @@ -386,7 +390,7 @@ function(runtime_register_target name)
add_dependencies(runtimes-configure runtimes-${name}-configure)
add_dependencies(install-runtimes install-runtimes-${name})
add_dependencies(install-runtimes-stripped install-runtimes-${name}-stripped)
if(LLVM_INCLUDE_TESTS)
if(LLVM_INCLUDE_TESTS AND runtime_tests_enabled)
add_dependencies(check-runtimes check-runtimes-${name})
add_dependencies(runtimes-test-depends runtimes-test-depends-${name})
endif()
Expand Down