@@ -1835,6 +1835,7 @@ void ProjMgrWorker::ResolvePackRequirement(ContextItem& context, const PackItem&
18351835}
18361836
18371837bool ProjMgrWorker::ProcessToolchain (ContextItem& context) {
1838+ RetrieveToolchainConfigFiles ();
18381839 if (context.compiler .empty ()) {
18391840 // Use the default compiler if available
18401841 if (context.cdefault && !context.cdefault ->compiler .empty ()) {
@@ -3939,7 +3940,7 @@ void ProjMgrWorker::PrintMissingFilters(void) {
39393940 (misspelled ? " , did you mean '." + type + " '?" : " " ));
39403941 }
39413942 for (const auto & toolchain : m_missingToolchains) {
3942- ProjMgrLogger::Get ().Warn (" compiler ' " + toolchain + " ' is not supported" );
3943+ ProjMgrLogger::Get ().Warn (" 'for- compiler: " + toolchain + " ' is not supported" );
39433944 }
39443945}
39453946
@@ -5152,17 +5153,20 @@ bool ProjMgrWorker::GetLatestToolchain(ToolchainItem& toolchain) {
51525153 return found;
51535154}
51545155
5155- bool ProjMgrWorker::GetToolchainConfig (const string& toolchainName, const string& toolchainVersion, string& configPath, string& selectedConfigVersion) {
5156- const string& compilerRoot = GetCompilerRoot ();
5156+ void ProjMgrWorker::RetrieveToolchainConfigFiles (void ) {
51575157 // get toolchain configuration files
51585158 if (m_toolchainConfigFiles.empty ()) {
51595159 // get *.cmake files from compiler root (not recursively)
5160- auto cmakeFiles = RteFsUtils::GrepFiles (compilerRoot , " *.cmake" );
5160+ auto cmakeFiles = RteFsUtils::GrepFiles (GetCompilerRoot () , " *.cmake" );
51615161 std::transform (cmakeFiles.begin (), cmakeFiles.end (), std::back_inserter (m_toolchainConfigFiles),
51625162 [](const std::filesystem::path& item) {
51635163 return item.generic_string ();
5164- });
5164+ });
51655165 }
5166+ }
5167+
5168+ bool ProjMgrWorker::GetToolchainConfig (const string& toolchainName, const string& toolchainVersion, string& configPath, string& selectedConfigVersion) {
5169+ RetrieveToolchainConfigFiles ();
51665170 // find greatest compatible file
51675171 bool found = false ;
51685172 static const regex regEx = regex (" (\\ w+)\\ .(\\ d+\\ .\\ d+\\ .\\ d+)" );
@@ -5189,7 +5193,7 @@ bool ProjMgrWorker::GetToolchainConfig(const string& toolchainName, const string
51895193 }
51905194 }
51915195 if (!found) {
5192- m_toolchainErrors[MessageType::Error].insert (" no toolchain cmake files found for '" + toolchainName + " ' in '" + compilerRoot + " ' directory" );
5196+ m_toolchainErrors[MessageType::Error].insert (" no toolchain cmake files found for '" + toolchainName + " ' in '" + GetCompilerRoot () + " ' directory" );
51935197 }
51945198 return found;
51955199}
0 commit comments