Fix build issue with CUDA testing targets when compiling without gflags.

Change-Id: I926a85c30b51802a99161679cb2a28fda6e3ef47
This commit is contained in:
Joydeep Biswas
2022-07-20 21:31:47 +05:30
parent c801192d47
commit 2f660464cc
+2 -2
View File
@@ -147,7 +147,7 @@ if (USE_CUDA)
${CUDA_cublas_LIBRARY}
${CUDA_cusolver_LIBRARY}
${CUDA_cusparse_LIBRARY})
if (BUILD_TESTING)
if (BUILD_TESTING AND GFLAGS)
add_test(
NAME cuda_memcheck_dense_qr_test
COMMAND ${CUDA_TOOLKIT_ROOT_DIR}/bin/cuda-memcheck --leak-check full
@@ -156,7 +156,7 @@ if (USE_CUDA)
NAME cuda_memcheck_dense_cholesky_test
COMMAND ${CUDA_TOOLKIT_ROOT_DIR}/bin/cuda-memcheck --leak-check full
$<TARGET_FILE:cuda_dense_cholesky_test>)
endif (BUILD_TESTING)
endif (BUILD_TESTING AND GFLAGS)
set_source_files_properties(ceres_cuda_kernels.cu PROPERTIES LANGUAGE CUDA)
add_library(ceres_cuda_kernels ceres_cuda_kernels.cu)
target_compile_features(ceres_cuda_kernels PRIVATE cxx_std_14)