Merge topic 'ghs-updates'

04de9007 GHS: Fix generated file path slashes and quoting for 6.1.6
fbe0de92 GHS: Tell MULTI to delete .elf.ael file
63591b94 GHS: Find latest 'int' directory
This commit is contained in:
Brad King 2015-09-10 11:29:44 -04:00 committed by CMake Topic Stage
commit 5ed30f30f5
2 changed files with 41 additions and 18 deletions

View File

@ -13,13 +13,35 @@
# License text for the above reference.) # License text for the above reference.)
#Setup Greenhills MULTI specific compilation information #Setup Greenhills MULTI specific compilation information
find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122 if (NOT GHS_INT_DIRECTORY)
"C:/ghs/int1122" #Assume the C:/ghs/int#### directory that is latest is prefered
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104 set(GHS_EXPECTED_ROOT "C:/ghs")
"C:/ghs/int1104" if (EXISTS ${GHS_EXPECTED_ROOT})
DOC "Path to integrity directory" FILE(GLOB GHS_CANDIDATE_INT_DIRS RELATIVE
) ${GHS_EXPECTED_ROOT} ${GHS_EXPECTED_ROOT}/*)
string(REGEX MATCHALL "int[0-9][0-9][0-9][0-9]" GHS_CANDIDATE_INT_DIRS
${GHS_CANDIDATE_INT_DIRS})
if (GHS_CANDIDATE_INT_DIRS)
list(SORT GHS_CANDIDATE_INT_DIRS)
list(GET GHS_CANDIDATE_INT_DIRS -1 GHS_INT_DIRECTORY)
string(CONCAT GHS_INT_DIRECTORY ${GHS_EXPECTED_ROOT} "/"
${GHS_INT_DIRECTORY})
endif ()
endif ()
#Try to look for known registry values
if (NOT GHS_INT_DIRECTORY)
find_path(GHS_INT_DIRECTORY INTEGRITY.ld PATHS
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware6433c345;InstallLocation]" #int1122
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GreenHillsSoftware289b6625;InstallLocation]" #int1104
)
endif ()
set(GHS_INT_DIRECTORY ${GHS_INT_DIRECTORY} CACHE PATH
"Path to integrity directory")
endif ()
set(GHS_OS_DIR ${GHS_INT_DIRECTORY} CACHE PATH "OS directory") set(GHS_OS_DIR ${GHS_INT_DIRECTORY} CACHE PATH "OS directory")
set(GHS_PRIMARY_TARGET "arm_integrity.tgt" CACHE STRING "target for compilation") set(GHS_PRIMARY_TARGET "arm_integrity.tgt" CACHE STRING "target for compilation")
set(GHS_BSP_NAME "simarm" CACHE STRING "BSP name") set(GHS_BSP_NAME "simarm" CACHE STRING "BSP name")

View File

@ -151,10 +151,6 @@ void cmGhsMultiTargetGenerator::Generate()
this->WriteTargetLinkLibraries(); this->WriteTargetLinkLibraries();
} }
this->WriteCustomCommands(); this->WriteCustomCommands();
if (this->DynamicDownload)
{
*this->GetFolderBuildStreams() << " " << this->DDOption << std::endl;
}
this->WriteSources(objectSources); this->WriteSources(objectSources);
} }
@ -230,9 +226,11 @@ void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
} }
if (this->IsTargetGroup()) if (this->IsTargetGroup())
{ {
*this->GetFolderBuildStreams() << " -non_shared" << std::endl; *this->GetFolderBuildStreams()
*this->GetFolderBuildStreams() << " -o \"" << outputDir << " {optgroup=GhsCommonOptions} -o \"" << outputDir
<< outputFilename << ".elf\"" << outputFilename << ".elf\"" << std::endl;
*this->GetFolderBuildStreams() << " :extraOutputFile=\"" << outputDir
<< outputFilename << ".elf.ael\""
<< std::endl; << std::endl;
} }
else else
@ -454,14 +452,17 @@ void cmGhsMultiTargetGenerator::WriteSources(
this->Makefile->GetHomeOutputDirectory(), sgPath, this->Makefile->GetHomeOutputDirectory(), sgPath,
GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath); 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() << "\"" *this->FolderBuildStreams[sgPath] << fullSourcePath << std::endl;
<< std::endl;
} }
else 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() && if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() &&