[llvm] r279756 - Hooking up a check-all target for the runtimes projects
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 10:18:42 PDT 2016
Author: cbieneman
Date: Thu Aug 25 12:18:41 2016
New Revision: 279756
URL: http://llvm.org/viewvc/llvm-project?rev=279756&view=rev
Log:
Hooking up a check-all target for the runtimes projects
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/runtimes/CMakeLists.txt
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=279756&r1=279755&r2=279756&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Aug 25 12:18:41 2016
@@ -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()
Modified: llvm/trunk/runtimes/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=279756&r1=279755&r2=279756&view=diff
==============================================================================
--- llvm/trunk/runtimes/CMakeLists.txt (original)
+++ llvm/trunk/runtimes/CMakeLists.txt Thu Aug 25 12:18:41 2016
@@ -37,7 +37,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
# 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_
# 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
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
# 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()
More information about the llvm-commits
mailing list