mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
VS: Do not use absolute paths to CUDA sources
The CUDA Toolkit's VS integration does not properly compute the intermediate files directory location when the path to the source file is absolute.
This commit is contained in:
parent
b64b4629ea
commit
b966f489c1
@ -1717,8 +1717,10 @@ void cmVisualStudio10TargetGenerator::WriteSource(std::string const& tool,
|
||||
//
|
||||
// and fail if this exceeds the maximum allowed path length. Our path
|
||||
// conversion uses full paths when possible to allow deeper trees.
|
||||
bool forceRelative = false;
|
||||
std::string sourceFile = this->ConvertPath(sf->GetFullPath(), false);
|
||||
// However, CUDA 8.0 msbuild rules fail on absolute paths so for CUDA
|
||||
// we must use relative paths.
|
||||
bool forceRelative = sf->GetLanguage() == "CUDA";
|
||||
std::string sourceFile = this->ConvertPath(sf->GetFullPath(), forceRelative);
|
||||
if (this->LocalGenerator->GetVersion() ==
|
||||
cmGlobalVisualStudioGenerator::VS10 &&
|
||||
cmSystemTools::FileIsFullPath(sourceFile.c_str())) {
|
||||
|
Loading…
Reference in New Issue
Block a user