wxString CppCheckSettings::GetOptions() const { wxString options; if (GetStyle()) { options << wxT(" --enable=style "); } if (GetPerformance()) { options << wxT(" --enable=performance "); } if (GetPortability()) { options << wxT(" --enable=portability "); } if (GetUnusedFunctions()) { options << wxT(" --enable=unusedFunction "); } if (GetMissingIncludes()) { options << wxT(" --enable=missingInclude "); } if (GetInformation()) { options << wxT(" --enable=information "); } if (GetPosixStandards()) { options << wxT(" --std=posix "); } if (GetC99Standards()) { options << wxT(" --std=c99 "); } if (GetCpp11Standards()) { options << wxT(" --std=c++11 "); } if (GetForce()) { options << wxT("--force "); } // Now add any ticked suppressedwarnings std::map<wxString, wxString>::const_iterator iter = m_SuppressedWarnings1.begin(); for (; iter != m_SuppressedWarnings1.end(); ++iter) { options << wxT(" --suppress=") << (*iter).first; } options << wxT(" --template gcc "); return options; }
wxString CppCheckSettings::GetOptions() const { wxString options; if(GetStyle()) { options << wxT(" --enable=style "); } if(GetPerformance()) { options << wxT(" --enable=performance "); } if(GetPortability()) { options << wxT(" --enable=portability "); } if(GetUnusedFunctions()) { options << wxT(" --enable=unusedFunction "); } if(GetMissingIncludes()) { options << wxT(" --enable=missingInclude "); } if(GetInformation()) { options << wxT(" --enable=information "); } if(GetPosixStandards()) { options << wxT(" --std=posix "); } if(GetC99Standards()) { options << wxT(" --std=c99 "); } if(GetCpp11Standards()) { options << wxT(" --std=c++11 "); } if(GetForce()) { options << wxT("--force "); } if(GetJobs() > 1) { options << wxT("-j") << GetJobs() << " "; } if(GetCheckConfig()) { options << wxT("--check-config "); // Though this turns off other checks, afaict it does not harm to emit them } // Now add any ticked suppressedwarnings std::map<wxString, wxString>::const_iterator iter = m_SuppressedWarnings1.begin(); for(; iter != m_SuppressedWarnings1.end(); ++iter) { options << wxT(" --suppress=") << (*iter).first << " "; } // IncludeDirs for(size_t n = 0; n < m_IncludeDirs.GetCount(); ++n) { wxString item = m_IncludeDirs.Item(n); item.Trim().Trim(false); if(!item.empty()) { options << " -I" << item << " "; } } if(m_SuppressSystemIncludes) { options << wxT(" --suppress=") << "missingIncludeSystem "; } // (Un)Definitions for(size_t n = 0; n < m_definitions.GetCount(); ++n) { wxString item = m_definitions.Item(n); item.Trim().Trim(false); if(!item.empty()) { options << " -D" << item << " "; } } for(size_t n = 0; n < m_undefines.GetCount(); ++n) { wxString item = m_undefines.Item(n); item.Trim().Trim(false); if(!item.empty()) { options << " -U" << item << " "; } } options << wxT(" --template gcc "); return options; }