diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 23a726a1a2..3cd9c62d1f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3765,7 +3765,7 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( // Specify the compiler program database file if configured. std::string pdb = this->GeneratorTarget->GetCompilePDBPath(configName); - if (!pdb.empty()) { + if (!pdb.empty() && !cmHasSuffix(pdb, '/') && !cmHasSuffix(pdb, '\\')) { if (this->GlobalGenerator->IsCudaEnabled()) { // CUDA does not quote paths with spaces correctly when forwarding // this to the host compiler. Use a relative path to avoid spaces.