MantisBT - CMake
View Issue Details
0015086CMakeCMakepublic2014-08-14 06:222016-06-10 14:31
Ignasi Rius 
Kitware Robot 
normalminoralways
closedmoved 
Intel 32 or 64 bitsWindows8.1
CMake 3.0.1 
 
0015086: CUDA_ADD_EXECUTABLE generates invalid VS2012 projects when source .cu file is a relative path beggining with "../"
An invalid Visual Studio 2012 project is generated when CUDA_ADD_EXECUTABLE is called with a source file such as:

cuda_add_executable(testFindCuda ../3rdparty/testCuda.cu)

VS complaints that the .cu file is included in both the CustomBuild and None ItemGroups and the project simply doesn't load.

However, if the testCuda.cu file is specified with an absolut path everything works fine.
I have included a toy example to reproduce the problem (check testFindCuda.rar).

1) Just extract the files, and run cmake-gui (Windows) on testFindCuda/mainProject.
2) Generate a "Visual Studio 11 2012" solution.
3) Open the resulting .sln with VS2012 and you'll see that it's broken.
In particular it seems that the "offending line" in the .vcxproj file is:

 <None Include="C:\Temp\testFindCuda\3rdparty\testCuda.cu" />
No tags attached.
rar testFindCuda.rar (481) 2014-08-14 06:22
https://public.kitware.com/Bug/file/5228/testFindCuda.rar
Issue History
2014-08-14 06:22Ignasi RiusNew Issue
2014-08-14 06:22Ignasi RiusFile Added: testFindCuda.rar
2016-06-10 14:29Kitware RobotNote Added: 0042607
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042607)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.