[cmake-developers] [CMake 0015086]: CUDA_ADD_EXECUTABLE generates invalid VS2012 projects when source .cu file is a relative path beggining with "../"

Mantis Bug Tracker mantis at public.kitware.com
Thu Aug 14 06:22:55 EDT 2014


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15086 
====================================================================== 
Reported By:                Ignasi Rius
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15086
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-08-14 06:22 EDT
Last Modified:              2014-08-14 06:22 EDT
====================================================================== 
Summary:                    CUDA_ADD_EXECUTABLE generates invalid VS2012
projects when source .cu file is a relative path beggining with "../"
Description: 
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.

Steps to Reproduce: 
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.

Additional Information: 
In particular it seems that the "offending line" in the .vcxproj file is:

 <None Include="C:\Temp\testFindCuda\3rdparty\testCuda.cu" />
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-08-14 06:22 Ignasi Rius    New Issue                                    
2014-08-14 06:22 Ignasi Rius    File Added: testFindCuda.rar                    
======================================================================



More information about the cmake-developers mailing list