[test-suite] r281572 - [test-suite] [CUDA] Run simple tests with -std=c++14.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 18:58:42 PDT 2016
Author: jlebar
Date: Wed Sep 14 20:58:42 2016
New Revision: 281572
URL: http://llvm.org/viewvc/llvm-project?rev=281572&view=rev
Log:
[test-suite] [CUDA] Run simple tests with -std=c++14.
Modified:
test-suite/trunk/External/CUDA/CMakeLists.txt
Modified: test-suite/trunk/External/CUDA/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/CUDA/CMakeLists.txt?rev=281572&r1=281571&r2=281572&view=diff
==============================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt (original)
+++ test-suite/trunk/External/CUDA/CMakeLists.txt Wed Sep 14 20:58:42 2016
@@ -111,7 +111,7 @@ function(create_thrust_tests VariantSuff
endfunction()
# Create set of tests for a given {CUDA,C++ standard,C++ library} tuple.
-function(create_cuda_test_variant VariantSuffix)
+function(create_cuda_test_variant Std VariantSuffix)
message(STATUS "Creating CUDA test variant ${VariantSuffix}")
add_custom_target(cuda-tests-${VariantSuffix}
COMMENT "Build CUDA test variant ${VariantSuffix}")
@@ -126,7 +126,7 @@ function(create_cuda_test_variant Varian
create_local_cuda_tests(${VariantSuffix})
add_dependencies(cuda-tests-simple cuda-tests-simple-${VariantSuffix})
- if(EXISTS ${THRUST_PATH})
+ if(EXISTS ${THRUST_PATH} AND (NOT ${Std} STREQUAL "c++14"))
create_thrust_tests(${VariantSuffix})
endif()
endfunction(create_cuda_test_variant)
@@ -242,12 +242,15 @@ macro(create_cuda_tests)
set(_Cuda_Suffix "cuda-${_CudaVersion}")
set(_Cuda_CPPFLAGS --cuda-path=${_CudaPath} -I${_CudaPath}/include)
set(_Cuda_Libs cudart-${_CudaVersion})
- foreach(_Std IN ITEMS "c++98" "c++11")
+ foreach(_Std IN ITEMS "c++98" "c++11" "c++14")
set(_Std_Suffix "${_Std}")
set(_Std_CPPFLAGS -std=${_Std})
set(_Std_LDFLAGS -std=${_Std})
foreach(_GccPath IN LISTS GCC_PATHS)
get_version(_GccVersion ${_GccPath})
+ if (${_Std} STREQUAL "c++14" AND ${_GccVersion} VERSION_LESS "4.9")
+ continue()
+ endif()
set(_Gcc_Suffix "libstdc++-${_GccVersion}")
# Tell clang to use libstdc++ and where to find it.
set(_Stdlib_CPPFLAGS -stdlib=libstdc++ -gcc-toolchain ${_GccPath})
@@ -255,7 +258,7 @@ macro(create_cuda_tests)
# Add libstdc++ as link dependency.
set(_Stdlib_Libs libstdcxx-${_GccVersion})
- create_cuda_test_variant("${_Cuda_Suffix}-${_Std_Suffix}-${_Gcc_Suffix}")
+ create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-${_Gcc_Suffix}")
endforeach()
if (HAVE_LIBCXX)
@@ -266,7 +269,7 @@ macro(create_cuda_tests)
set(_Stdlib_CPPFLAGS -stdlib=libc++ -I${_compiler_path}/../include)
set(_Stdlib_LDFLAGS -stdlib=libc++)
set(_Stdlib_Libs libcxx)
- create_cuda_test_variant("${_Cuda_Suffix}-${_Std_Suffix}-libc++")
+ create_cuda_test_variant(${_Std} "${_Cuda_Suffix}-${_Std_Suffix}-libc++")
endif()
endforeach()
endforeach()
More information about the llvm-commits
mailing list