[cmake-developers] CUDA + CMake 3.0.0 + Ninja generates bogus dependency warnings

Adam Strzelecki ono at java.pl
Wed Jun 11 15:34:52 EDT 2014


Consider following example:

CMakeLists.txt
==============
cmake_minimum_required(VERSION 2.6)
project(TestCUDA CXX)
find_package(CUDA)
cuda_add_executable(test_cuda test_cuda.cu)

test_cuda.cu
============
int main(int argc, char const *argv[]) { return 0; }


Running: cmake -GNinja && ninja

ninja: warning: multiple rules generate CMakeFiles/test_cuda.dir/test_cuda_generated_test_cuda.cu.o.depend. builds involving this target will not be correct; continuing anyway
[1/2] Building NVCC (Device) object CMakeFiles/test_cuda.dir//./test_cuda_generated_test_cuda.cu.o

What is that?

Is there any way to circumvent that?

Regards,
-- 
Adam


More information about the cmake-developers mailing list