[test-suite] r340829 - [test-suite, CUDA] Fix some CMake problems
Jonas Hahnfeld via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 08:01:45 PDT 2018
Author: hahnfeld
Date: Tue Aug 28 08:01:44 2018
New Revision: 340829
URL: http://llvm.org/viewvc/llvm-project?rev=340829&view=rev
Log:
[test-suite, CUDA] Fix some CMake problems
1. The regex was matching any number in the path which is a problem
if your path to external/ had numbers in it. I think this was
because of the wrong string escape.
2. If /thrust does not exist, the variable isn't set at all. Avoid
failure on EXISTS with empty path by using DEFINED.
Differential Revision: https://reviews.llvm.org/D51256
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=340829&r1=340828&r2=340829&view=diff
==============================================================================
--- test-suite/trunk/External/CUDA/CMakeLists.txt (original)
+++ test-suite/trunk/External/CUDA/CMakeLists.txt Tue Aug 28 08:01:44 2018
@@ -36,7 +36,7 @@ set(SUPPORTED_GPU_CUDA_9_2
# Output:
# Sets Var=x.y.z
macro(get_version Var Path)
- string(REGEX MATCH "[0-9]+(\.[0-9]+)+" ${Var} ${Path})
+ string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ${Var} ${Path})
endmacro (get_version)
# Helper function to glob CUDA source files and set LANGUAGE property
@@ -180,7 +180,7 @@ function(create_cuda_test_variant Std Va
create_local_cuda_tests(${VariantSuffix})
add_dependencies(cuda-tests-simple cuda-tests-simple-${VariantSuffix})
- if(EXISTS ${THRUST_PATH} AND (NOT ${Std} STREQUAL "c++14"))
+ if(DEFINED THRUST_PATH AND (NOT ${Std} STREQUAL "c++14"))
create_thrust_tests(${VariantSuffix})
endif()
More information about the llvm-commits
mailing list