mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 10:32:48 +02:00
Hooking up a check-all target for the runtimes projects
llvm-svn: 279756
This commit is contained in:
parent
9544cc08df
commit
9b02f49869
@ -829,6 +829,9 @@ if( LLVM_INCLUDE_TESTS )
|
||||
DEPENDS ${LLVM_LIT_DEPENDS}
|
||||
ARGS ${LLVM_LIT_EXTRA_ARGS}
|
||||
)
|
||||
if(TARGET check-runtimes)
|
||||
add_dependencies(check-all check-runtimes)
|
||||
endif()
|
||||
add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS})
|
||||
set_target_properties(test-depends PROPERTIES FOLDER "Tests")
|
||||
endif()
|
||||
|
@ -37,7 +37,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# Setting these variables will allow the sub-build to put their outputs into
|
||||
# the library and bin directories of the top-level build.
|
||||
set(LLVM_LIBRARY_OUTPUT_INTDIR ${LLVM_LIBRARY_DIR})
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_BINARY_DIR})
|
||||
set(LLVM_RUNTIME_OUTPUT_INTDIR ${LLVM_TOOLS_BINARY_DIR})
|
||||
|
||||
foreach(entry ${runtimes})
|
||||
get_filename_component(projName ${entry} NAME)
|
||||
@ -52,9 +52,37 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# will be included under here.
|
||||
set(HAVE_${canon_name} On)
|
||||
|
||||
# Between each sub-project we want to cache and clear the LIT properties
|
||||
set_property(GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
|
||||
set_property(GLOBAL PROPERTY LLVM_LIT_PARAMS)
|
||||
set_property(GLOBAL PROPERTY LLVM_LIT_DEPENDS)
|
||||
set_property(GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
|
||||
|
||||
add_subdirectory(${projName})
|
||||
|
||||
get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
|
||||
get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
|
||||
get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
|
||||
get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
|
||||
|
||||
list(APPEND RUNTIMES_LIT_TESTSUITES ${LLVM_LIT_TESTSUITES})
|
||||
list(APPEND RUNTIMES_LIT_PARAMS ${LLVM_LIT_PARAMS})
|
||||
list(APPEND RUNTIMES_LIT_DEPENDS ${LLVM_LIT_DEPENDS})
|
||||
list(APPEND RUNTIMES_LIT_EXTRA_ARGS ${LLVM_LIT_EXTRA_ARGS})
|
||||
endforeach()
|
||||
|
||||
# Add a global check rule now that all subdirectories have been traversed
|
||||
# and we know the total set of lit testsuites.
|
||||
|
||||
add_lit_target(check-runtimes
|
||||
"Running all regression tests"
|
||||
${RUNTIMES_LIT_TESTSUITES}
|
||||
PARAMS ${RUNTIMES_LIT_PARAMS}
|
||||
DEPENDS ${RUNTIMES_LIT_DEPENDS}
|
||||
ARGS ${RUNTIMES_LIT_EXTRA_ARGS}
|
||||
)
|
||||
add_custom_target(test-depends-runtimes DEPENDS ${RUNTIMES_LIT_DEPENDS})
|
||||
|
||||
else() # if this is included from LLVM's CMake
|
||||
include(LLVMExternalProjectUtils)
|
||||
|
||||
@ -86,6 +114,14 @@ else() # if this is included from LLVM's CMake
|
||||
endforeach()
|
||||
|
||||
if(runtimes)
|
||||
|
||||
foreach(runtime_name ${runtime_names})
|
||||
list(APPEND extra_targets
|
||||
${runtime_name}
|
||||
install-${runtime_name}
|
||||
check-${runtime_name})
|
||||
endforeach()
|
||||
|
||||
# Create a runtimes target that uses this file as its top-level CMake file.
|
||||
# The runtimes target is a configuration of all the runtime libraries
|
||||
# together in a single CMake invocaiton.
|
||||
@ -95,7 +131,11 @@ else() # if this is included from LLVM's CMake
|
||||
# Builtins were built separately above
|
||||
CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
|
||||
PASSTHROUGH_PREFIXES ${prefixes}
|
||||
EXTRA_TARGETS ${runtime_names}
|
||||
EXTRA_TARGETS ${extra_targets}
|
||||
test-depends-runtimes
|
||||
check-runtimes
|
||||
USE_TOOLCHAIN)
|
||||
set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS test-depends-runtimes)
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user