From 04de900704c24567521dd29c0bdb46786eea5e71 Mon Sep 17 00:00:00 2001 From: Geoff Viola Date: Sat, 5 Sep 2015 23:15:26 -0600 Subject: [PATCH] GHS: Fix generated file path slashes and quoting for 6.1.6 --- Source/cmGhsMultiTargetGenerator.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 8216824bb..cae5c2f46 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -452,14 +452,17 @@ void cmGhsMultiTargetGenerator::WriteSources( this->Makefile->GetHomeOutputDirectory(), sgPath, GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath); - if ((*si)->GetExtension() == ".int") + std::string fullSourcePath((*si)->GetFullPath()); + if ((*si)->GetExtension() == "int" || (*si)->GetExtension() == "bsp") { - *this->FolderBuildStreams[sgPath] << "\"" << (*si)->GetFullPath() << "\"" - << std::endl; + *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl; } else { - *this->FolderBuildStreams[sgPath] << (*si)->GetFullPath() << std::endl; + //WORKAROUND: GHS MULTI needs the path to use backslashes without quotes + // to open files in search as of version 6.1.6 + cmsys::SystemTools::ReplaceString(fullSourcePath, "/", "\\"); + *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl; } if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() &&