[PATCH] D24585: [test-suite] Organize build targets for CUDA tests.

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 14:36:23 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL281541: [test-suite] Organize build targets for CUDA tests (authored by tra).

Changed prior to commit:
  https://reviews.llvm.org/D24585?vs=71436&id=71440#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24585

Files:
  test-suite/trunk/External/CUDA/CMakeLists.txt

Index: test-suite/trunk/External/CUDA/CMakeLists.txt
===================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt
+++ test-suite/trunk/External/CUDA/CMakeLists.txt
@@ -69,7 +69,7 @@
 endmacro()
 
 function(create_thrust_tests VariantSuffix)
-  set(_ThrustMainTarget thrust-${VariantSuffix})
+  set(_ThrustMainTarget cuda-tests-thrust-${VariantSuffix})
   if(LARGE_PROBLEM_SIZE)
     set(_ExtraThrustTestArgs "--sizes=large")
   endif()
@@ -104,6 +104,7 @@
     target_compile_options(${_target} PUBLIC ${THRUST_CPPFLAGS})
     target_link_libraries(${_target} ${VariantLibs})
   endif()
+  add_dependencies(cuda-tests-thrust ${_ThrustMainTarget})
   list(APPEND VARIANT_CUDA_TESTS ${_ThrustMainTarget})
   set(VARIANT_CUDA_TESTS ${VARIANT_CUDA_TESTS} PARENT_SCOPE)
 endfunction()
@@ -206,6 +207,7 @@
 
   if(EXISTS "${TEST_SUITE_CUDA_ROOT}/thrust")
     message(STATUS "Found Thrust ${THRUST_PATH}")
+    add_custom_target(cuda-tests-thrust COMMENT "All thrust tests.")
     if(THRUST_SPLIT_TESTS)
       message(WARNING
 	"############################################################\n"
@@ -258,9 +260,7 @@
         # Add libstdc++ as link dependency.
         set(_Stdlib_Libs libstdcxx-${_GccVersion})
 
-        set(VARIANT_CUDA_TESTS)
         create_cuda_test_variant("${_Cuda_Suffix}-${_Std_Suffix}-${_Gcc_Suffix}")
-        list(APPEND ALL_CUDA_TESTS ${VARIANT_CUDA_TESTS})
       endforeach()
 
       if (HAVE_LIBCXX)
@@ -271,15 +271,13 @@
 	set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include)
 	set(_Stdlib_LDFLAGS  -stdlib=libc++)
 	set(_Stdlib_Libs libcxx)
-	set(VARIANT_CUDA_TESTS)
 	create_cuda_test_variant("${_Cuda_Suffix}-${_Std_Suffix}-libc++")
-	list(APPEND ALL_CUDA_TESTS ${VARIANT_CUDA_TESTS})
       endif()
     endforeach()
   endforeach()
 
   # convenience target to build all CUDA tests.
-  add_custom_target(cuda-tests-all DEPENDS ${ALL_CUDA_TESTS}
+  add_custom_target(cuda-tests-all DEPENDS cuda-tests-simple cuda-tests-thrust
     COMMENT "Build all CUDA tests.")
 endmacro(create_cuda_tests)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24585.71440.patch
Type: text/x-patch
Size: 2100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160914/05d6cf11/attachment.bin>


More information about the llvm-commits mailing list