cmGhsMultiTargetGenerator.cxx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2015 Geoffrey Viola <[email protected]>
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmGhsMultiTargetGenerator.h"
  11. #include "cmGlobalGhsMultiGenerator.h"
  12. #include "cmLocalGhsMultiGenerator.h"
  13. #include "cmMakefile.h"
  14. #include "cmTarget.h"
  15. #include "cmGeneratedFileStream.h"
  16. #include "cmSourceFile.h"
  17. #include <assert.h>
  18. #include <cmAlgorithms.h>
  19. std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic");
  20. cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget *target)
  21. : Target(target->Target)
  22. , GeneratorTarget(target)
  23. , LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>(
  24. target->GetLocalGenerator()))
  25. , Makefile(target->Target->GetMakefile())
  26. , TargetGroup(DetermineIfTargetGroup(target->Target))
  27. , DynamicDownload(false)
  28. {
  29. this->RelBuildFilePath = this->GetRelBuildFilePath(target->Target);
  30. this->RelOutputFileName =
  31. this->RelBuildFilePath + this->Target->GetName() + ".a";
  32. this->RelBuildFileName = this->RelBuildFilePath;
  33. this->RelBuildFileName += this->GetBuildFileName(target->Target);
  34. std::string absPathToRoot = this->GetAbsPathToRoot(target->Target);
  35. absPathToRoot = this->AddSlashIfNeededToPath(absPathToRoot);
  36. this->AbsBuildFilePath = absPathToRoot + this->RelBuildFilePath;
  37. this->AbsBuildFileName = absPathToRoot + this->RelBuildFileName;
  38. this->AbsOutputFileName = absPathToRoot + this->RelOutputFileName;
  39. }
  40. cmGhsMultiTargetGenerator::~cmGhsMultiTargetGenerator()
  41. {
  42. cmDeleteAll(this->FolderBuildStreams);
  43. }
  44. std::string
  45. cmGhsMultiTargetGenerator::GetRelBuildFilePath(const cmTarget *target)
  46. {
  47. std::string output;
  48. char const *folderProp = target->GetProperty("FOLDER");
  49. output = NULL == folderProp ? "" : folderProp;
  50. cmSystemTools::ConvertToUnixSlashes(output);
  51. if (!output.empty())
  52. {
  53. output += "/";
  54. }
  55. output += target->GetName() + "/";
  56. return output;
  57. }
  58. std::string
  59. cmGhsMultiTargetGenerator::GetAbsPathToRoot(const cmTarget *target)
  60. {
  61. return target->GetMakefile()->GetHomeOutputDirectory();
  62. }
  63. std::string
  64. cmGhsMultiTargetGenerator::GetAbsBuildFilePath(const cmTarget *target)
  65. {
  66. std::string output;
  67. output = cmGhsMultiTargetGenerator::GetAbsPathToRoot(target);
  68. output = cmGhsMultiTargetGenerator::AddSlashIfNeededToPath(output);
  69. output += cmGhsMultiTargetGenerator::GetRelBuildFilePath(target);
  70. return output;
  71. }
  72. std::string
  73. cmGhsMultiTargetGenerator::GetRelBuildFileName(const cmTarget *target)
  74. {
  75. std::string output;
  76. output = cmGhsMultiTargetGenerator::GetRelBuildFilePath(target);
  77. output = cmGhsMultiTargetGenerator::AddSlashIfNeededToPath(output);
  78. output += cmGhsMultiTargetGenerator::GetBuildFileName(target);
  79. return output;
  80. }
  81. std::string cmGhsMultiTargetGenerator::GetBuildFileName(const cmTarget *target)
  82. {
  83. std::string output;
  84. output = target->GetName();
  85. output += cmGlobalGhsMultiGenerator::FILE_EXTENSION;
  86. return output;
  87. }
  88. std::string
  89. cmGhsMultiTargetGenerator::AddSlashIfNeededToPath(std::string const &input)
  90. {
  91. std::string output(input);
  92. if (!cmHasLiteralSuffix(output, "/"))
  93. {
  94. output += "/";
  95. }
  96. return output;
  97. }
  98. void cmGhsMultiTargetGenerator::Generate()
  99. {
  100. const std::vector<cmSourceFile *> objectSources = this->GetSources();
  101. if (!objectSources.empty() && this->IncludeThisTarget())
  102. {
  103. if (!cmSystemTools::FileExists(this->AbsBuildFilePath.c_str()))
  104. {
  105. cmSystemTools::MakeDirectory(this->AbsBuildFilePath.c_str());
  106. }
  107. cmGlobalGhsMultiGenerator::Open(std::string(""), this->AbsBuildFileName,
  108. &this->FolderBuildStreams);
  109. cmGlobalGhsMultiGenerator::OpenBuildFileStream(
  110. this->GetFolderBuildStreams());
  111. std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
  112. if (0 == config.length())
  113. {
  114. config = "RELEASE";
  115. }
  116. const std::string language(this->Target->GetLinkerLanguage(config));
  117. config = cmSystemTools::UpperCase(config);
  118. this->DynamicDownload = this->DetermineIfDynamicDownload(config, language);
  119. if (this->DynamicDownload)
  120. {
  121. *this->GetFolderBuildStreams() << "#component integrity_dynamic_download"
  122. << std::endl;
  123. }
  124. GhsMultiGpj::WriteGpjTag(this->GetGpjTag(), this->GetFolderBuildStreams());
  125. cmGlobalGhsMultiGenerator::WriteDisclaimer(this->GetFolderBuildStreams());
  126. bool const notKernel = this->IsNotKernel(config, language);
  127. this->WriteTypeSpecifics(config, notKernel);
  128. this->SetCompilerFlags(config, language, notKernel);
  129. this->WriteCompilerFlags(config, language);
  130. this->WriteCompilerDefinitions(config, language);
  131. this->WriteIncludes(config, language);
  132. if (this->Target->GetType() == cmTarget::EXECUTABLE)
  133. {
  134. this->WriteTargetLinkLibraries();
  135. }
  136. this->WriteCustomCommands();
  137. if (this->DynamicDownload)
  138. {
  139. *this->GetFolderBuildStreams() << " " << this->DDOption << std::endl;
  140. }
  141. this->WriteSources(objectSources);
  142. }
  143. }
  144. bool cmGhsMultiTargetGenerator::IncludeThisTarget()
  145. {
  146. bool output = true;
  147. char const *excludeFromAll = this->Target->GetProperty("EXCLUDE_FROM_ALL");
  148. if (NULL != excludeFromAll && '1' == excludeFromAll[0] &&
  149. '\0' == excludeFromAll[1])
  150. {
  151. output = false;
  152. }
  153. return output;
  154. }
  155. std::vector<cmSourceFile *> cmGhsMultiTargetGenerator::GetSources() const
  156. {
  157. std::vector<cmSourceFile *> output;
  158. std::string config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE");
  159. this->Target->GetSourceFiles(output, config);
  160. return output;
  161. }
  162. GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag() const
  163. {
  164. return cmGhsMultiTargetGenerator::GetGpjTag(this->Target);
  165. }
  166. GhsMultiGpj::Types cmGhsMultiTargetGenerator::GetGpjTag(const cmTarget *target)
  167. {
  168. GhsMultiGpj::Types output;
  169. if (cmGhsMultiTargetGenerator::DetermineIfTargetGroup(target))
  170. {
  171. output = GhsMultiGpj::INTERGRITY_APPLICATION;
  172. }
  173. else if (target->GetType() == cmTarget::STATIC_LIBRARY)
  174. {
  175. output = GhsMultiGpj::LIBRARY;
  176. }
  177. else
  178. {
  179. output = GhsMultiGpj::PROGRAM;
  180. }
  181. return output;
  182. }
  183. cmGlobalGhsMultiGenerator*
  184. cmGhsMultiTargetGenerator::GetGlobalGenerator() const
  185. {
  186. return static_cast<cmGlobalGhsMultiGenerator *>(
  187. this->LocalGenerator->GetGlobalGenerator());
  188. }
  189. void cmGhsMultiTargetGenerator::WriteTypeSpecifics(const std::string &config,
  190. bool const notKernel)
  191. {
  192. std::string outputDir(this->GetOutputDirectory(config));
  193. std::string outputFilename(this->GetOutputFilename(config));
  194. if (this->Target->GetType() == cmTarget::STATIC_LIBRARY)
  195. {
  196. *this->GetFolderBuildStreams() << " {optgroup=GhsCommonOptions} -o \""
  197. << outputDir << outputFilename << ".a\""
  198. << std::endl;
  199. }
  200. else if (this->Target->GetType() == cmTarget::EXECUTABLE)
  201. {
  202. if (notKernel && !this->IsTargetGroup())
  203. {
  204. *this->GetFolderBuildStreams() << " -relprog" << std::endl;
  205. }
  206. if (this->IsTargetGroup())
  207. {
  208. *this->GetFolderBuildStreams() << " -non_shared" << std::endl;
  209. *this->GetFolderBuildStreams() << " -o \"" << outputDir
  210. << outputFilename << ".elf\""
  211. << std::endl;
  212. }
  213. else
  214. {
  215. *this->GetFolderBuildStreams() << " {optgroup=GhsCommonOptions} -o \""
  216. << outputDir << outputFilename << ".as\""
  217. << std::endl;
  218. }
  219. }
  220. }
  221. void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const &config,
  222. const std::string &language,
  223. bool const notKernel)
  224. {
  225. std::map<std::string, std::string>::iterator i =
  226. this->FlagsByLanguage.find(language);
  227. if (i == this->FlagsByLanguage.end())
  228. {
  229. std::string flags;
  230. const char *lang = language.c_str();
  231. if (notKernel)
  232. {
  233. this->LocalGenerator->AddLanguageFlags(flags, lang, config);
  234. }
  235. else
  236. {
  237. this->LocalGenerator->AddLanguageFlags(
  238. flags, lang + std::string("_GHS_KERNEL"), config);
  239. }
  240. this->LocalGenerator->AddCMP0018Flags(flags, this->Target, lang, config);
  241. this->LocalGenerator->AddVisibilityPresetFlags(flags, this->Target, lang);
  242. // Append old-style preprocessor definition flags.
  243. if (std::string(" ") != std::string(this->Makefile->GetDefineFlags()))
  244. {
  245. this->LocalGenerator->AppendFlags(flags,
  246. this->Makefile->GetDefineFlags());
  247. }
  248. // Add target-specific flags.
  249. this->LocalGenerator->AddCompileOptions(flags, this->Target, lang, config);
  250. std::map<std::string, std::string>::value_type entry(language, flags);
  251. i = this->FlagsByLanguage.insert(entry).first;
  252. }
  253. }
  254. std::string cmGhsMultiTargetGenerator::GetDefines(const std::string &language,
  255. std::string const &config)
  256. {
  257. std::map<std::string, std::string>::iterator i =
  258. this->DefinesByLanguage.find(language);
  259. if (i == this->DefinesByLanguage.end())
  260. {
  261. std::set<std::string> defines;
  262. const char *lang = language.c_str();
  263. // Add the export symbol definition for shared library objects.
  264. if (const char *exportMacro = this->Target->GetExportMacro())
  265. {
  266. this->LocalGenerator->AppendDefines(defines, exportMacro);
  267. }
  268. // Add preprocessor definitions for this target and configuration.
  269. this->LocalGenerator->AddCompileDefinitions(defines, this->Target, config,
  270. language);
  271. std::string definesString;
  272. this->LocalGenerator->JoinDefines(defines, definesString, lang);
  273. std::map<std::string, std::string>::value_type entry(language,
  274. definesString);
  275. i = this->DefinesByLanguage.insert(entry).first;
  276. }
  277. return i->second;
  278. }
  279. void cmGhsMultiTargetGenerator::WriteCompilerFlags(std::string const &,
  280. const std::string &language)
  281. {
  282. std::map<std::string, std::string>::iterator flagsByLangI =
  283. this->FlagsByLanguage.find(language);
  284. if (flagsByLangI != this->FlagsByLanguage.end())
  285. {
  286. if (!flagsByLangI->second.empty())
  287. {
  288. *this->GetFolderBuildStreams() << " " << flagsByLangI->second
  289. << std::endl;
  290. }
  291. }
  292. }
  293. void cmGhsMultiTargetGenerator::WriteCompilerDefinitions(
  294. const std::string &config, const std::string &language)
  295. {
  296. std::vector<std::string> compileDefinitions;
  297. this->Target->GetCompileDefinitions(compileDefinitions, config, language);
  298. for (std::vector<std::string>::const_iterator cdI =
  299. compileDefinitions.begin();
  300. cdI != compileDefinitions.end(); ++cdI)
  301. {
  302. *this->GetFolderBuildStreams() << " -D" << (*cdI) << std::endl;
  303. }
  304. }
  305. void cmGhsMultiTargetGenerator::WriteIncludes(const std::string &config,
  306. const std::string &language)
  307. {
  308. std::vector<std::string> includes =
  309. this->Target->GetIncludeDirectories(config, language);
  310. for (std::vector<std::string>::const_iterator includes_i = includes.begin();
  311. includes_i != includes.end(); ++includes_i)
  312. {
  313. *this->GetFolderBuildStreams() << " -I\"" << *includes_i << "\""
  314. << std::endl;
  315. }
  316. }
  317. void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries()
  318. {
  319. // library directories
  320. cmTargetDependSet tds =
  321. this->GetGlobalGenerator()->GetTargetDirectDepends(this->GeneratorTarget);
  322. for (cmTargetDependSet::iterator tdsI = tds.begin(); tdsI != tds.end();
  323. ++tdsI)
  324. {
  325. const cmTarget *tg = (*tdsI)->Target;
  326. *this->GetFolderBuildStreams() << " -L\"" << GetAbsBuildFilePath(tg)
  327. << "\"" << std::endl;
  328. }
  329. // library targets
  330. cmTarget::LinkLibraryVectorType llv =
  331. this->Target->GetOriginalLinkLibraries();
  332. for (cmTarget::LinkLibraryVectorType::const_iterator llvI = llv.begin();
  333. llvI != llv.end(); ++llvI)
  334. {
  335. std::string libName = llvI->first;
  336. // if it is a user defined target get the full path to the lib
  337. cmTarget *tg(GetGlobalGenerator()->FindTarget(libName));
  338. if (NULL != tg)
  339. {
  340. libName = tg->GetName() + ".a";
  341. }
  342. *this->GetFolderBuildStreams() << " -l\"" << libName << "\""
  343. << std::endl;
  344. }
  345. }
  346. void cmGhsMultiTargetGenerator::WriteCustomCommands()
  347. {
  348. WriteCustomCommandsHelper(this->Target->GetPreBuildCommands(),
  349. cmTarget::PRE_BUILD);
  350. WriteCustomCommandsHelper(this->Target->GetPostBuildCommands(),
  351. cmTarget::POST_BUILD);
  352. }
  353. void cmGhsMultiTargetGenerator::WriteCustomCommandsHelper(
  354. std::vector<cmCustomCommand> const &commandsSet,
  355. cmTarget::CustomCommandType const commandType)
  356. {
  357. for (std::vector<cmCustomCommand>::const_iterator commandsSetI =
  358. commandsSet.begin();
  359. commandsSetI != commandsSet.end(); ++commandsSetI)
  360. {
  361. cmCustomCommandLines const &commands = commandsSetI->GetCommandLines();
  362. for (cmCustomCommandLines::const_iterator commandI = commands.begin();
  363. commandI != commands.end(); ++commandI)
  364. {
  365. switch (commandType)
  366. {
  367. case cmTarget::PRE_BUILD:
  368. *this->GetFolderBuildStreams() << " :preexecShellSafe=";
  369. break;
  370. case cmTarget::POST_BUILD:
  371. *this->GetFolderBuildStreams() << " :postexecShellSafe=";
  372. break;
  373. default:
  374. assert("Only pre and post are supported");
  375. }
  376. cmCustomCommandLine const &command = *commandI;
  377. for (cmCustomCommandLine::const_iterator commandLineI = command.begin();
  378. commandLineI != command.end(); ++commandLineI)
  379. {
  380. std::string subCommandE =
  381. this->LocalGenerator->EscapeForShell(*commandLineI, true);
  382. if (!command.empty())
  383. {
  384. *this->GetFolderBuildStreams()
  385. << (command.begin() == commandLineI ? "'" : " ");
  386. //Need to double escape backslashes
  387. cmSystemTools::ReplaceString(subCommandE, "\\", "\\\\");
  388. }
  389. *this->GetFolderBuildStreams() << subCommandE;
  390. }
  391. if (!command.empty())
  392. {
  393. *this->GetFolderBuildStreams() << "'" << std::endl;
  394. }
  395. }
  396. }
  397. }
  398. void cmGhsMultiTargetGenerator::WriteSources(
  399. std::vector<cmSourceFile *> const &objectSources)
  400. {
  401. for (std::vector<cmSourceFile *>::const_iterator si = objectSources.begin();
  402. si != objectSources.end(); ++si)
  403. {
  404. std::vector<cmSourceGroup> sourceGroups(this->Makefile->GetSourceGroups());
  405. char const *sourceFullPath = (*si)->GetFullPath().c_str();
  406. cmSourceGroup *sourceGroup =
  407. this->Makefile->FindSourceGroup(sourceFullPath, sourceGroups);
  408. std::string sgPath(sourceGroup->GetFullName());
  409. cmSystemTools::ConvertToUnixSlashes(sgPath);
  410. cmGlobalGhsMultiGenerator::AddFilesUpToPath(
  411. this->GetFolderBuildStreams(), &this->FolderBuildStreams,
  412. this->Makefile->GetHomeOutputDirectory(), sgPath,
  413. GhsMultiGpj::SUBPROJECT, this->RelBuildFilePath);
  414. if ((*si)->GetExtension() == ".int")
  415. {
  416. *this->FolderBuildStreams[sgPath] << "\"" << (*si)->GetFullPath() << "\""
  417. << std::endl;
  418. }
  419. else
  420. {
  421. *this->FolderBuildStreams[sgPath] << (*si)->GetFullPath() << std::endl;
  422. }
  423. if ("ld" != (*si)->GetExtension() && "int" != (*si)->GetExtension() &&
  424. "bsp" != (*si)->GetExtension())
  425. {
  426. this->WriteObjectLangOverride(this->FolderBuildStreams[sgPath], (*si));
  427. this->WriteObjectDir(this->FolderBuildStreams[sgPath],
  428. this->AbsBuildFilePath + sgPath);
  429. }
  430. }
  431. }
  432. void cmGhsMultiTargetGenerator::WriteObjectLangOverride(
  433. cmGeneratedFileStream *fileStream, cmSourceFile *sourceFile)
  434. {
  435. const char *rawLangProp = sourceFile->GetProperty("LANGUAGE");
  436. if (NULL != rawLangProp)
  437. {
  438. std::string sourceLangProp(rawLangProp);
  439. std::string extension(sourceFile->GetExtension());
  440. if ("CXX" == sourceLangProp && ("c" == extension || "C" == extension))
  441. {
  442. *fileStream << " -dotciscxx" << std::endl;
  443. }
  444. }
  445. }
  446. void cmGhsMultiTargetGenerator::WriteObjectDir(
  447. cmGeneratedFileStream *fileStream, std::string const &dir)
  448. {
  449. std::string workingDir(dir);
  450. cmSystemTools::ConvertToUnixSlashes(workingDir);
  451. if (!workingDir.empty())
  452. {
  453. workingDir += "/";
  454. }
  455. workingDir += "Objs";
  456. *fileStream << " -object_dir=\"" << workingDir << "\"" << std::endl;
  457. }
  458. std::string
  459. cmGhsMultiTargetGenerator::GetOutputDirectory(const std::string &config) const
  460. {
  461. std::string outputDir(AbsBuildFilePath);
  462. const char *runtimeOutputProp =
  463. this->Target->GetProperty("RUNTIME_OUTPUT_DIRECTORY");
  464. if (NULL != runtimeOutputProp)
  465. {
  466. outputDir = runtimeOutputProp;
  467. }
  468. std::string configCapped(cmSystemTools::UpperCase(config));
  469. const char *runtimeOutputSProp =
  470. this->Target->GetProperty("RUNTIME_OUTPUT_DIRECTORY_" + configCapped);
  471. if (NULL != runtimeOutputSProp)
  472. {
  473. outputDir = runtimeOutputSProp;
  474. }
  475. cmSystemTools::ConvertToUnixSlashes(outputDir);
  476. if (!outputDir.empty())
  477. {
  478. outputDir += "/";
  479. }
  480. return outputDir;
  481. }
  482. std::string
  483. cmGhsMultiTargetGenerator::GetOutputFilename(const std::string &config) const
  484. {
  485. std::string outputFilename(this->Target->GetName());
  486. const char *outputNameProp = this->Target->GetProperty("OUTPUT_NAME");
  487. if (NULL != outputNameProp)
  488. {
  489. outputFilename = outputNameProp;
  490. }
  491. std::string configCapped(cmSystemTools::UpperCase(config));
  492. const char *outputNameSProp =
  493. this->Target->GetProperty(configCapped + "_OUTPUT_NAME");
  494. if (NULL != outputNameSProp)
  495. {
  496. outputFilename = outputNameSProp;
  497. }
  498. return outputFilename;
  499. }
  500. bool cmGhsMultiTargetGenerator::IsNotKernel(std::string const &config,
  501. const std::string &language)
  502. {
  503. bool output;
  504. std::vector<std::string> options;
  505. this->Target->GetCompileOptions(options, config, language);
  506. output =
  507. options.end() == std::find(options.begin(), options.end(), "-kernel");
  508. return output;
  509. }
  510. bool cmGhsMultiTargetGenerator::DetermineIfTargetGroup(const cmTarget *target)
  511. {
  512. bool output = false;
  513. std::vector<cmSourceFile *> sources;
  514. std::string config =
  515. target->GetMakefile()->GetSafeDefinition("CMAKE_BUILD_TYPE");
  516. target->GetSourceFiles(sources, config);
  517. for (std::vector<cmSourceFile *>::const_iterator sources_i = sources.begin();
  518. sources.end() != sources_i; ++sources_i)
  519. {
  520. if ("int" == (*sources_i)->GetExtension())
  521. {
  522. output = true;
  523. }
  524. }
  525. return output;
  526. }
  527. bool cmGhsMultiTargetGenerator::DetermineIfDynamicDownload(
  528. std::string const &config, const std::string &language)
  529. {
  530. std::vector<std::string> options;
  531. bool output = false;
  532. this->Target->GetCompileOptions(options, config, language);
  533. for (std::vector<std::string>::const_iterator options_i = options.begin();
  534. options_i != options.end(); ++options_i)
  535. {
  536. std::string option = *options_i;
  537. if (this->DDOption == option)
  538. {
  539. output = true;
  540. }
  541. }
  542. return output;
  543. }