Skip to content

Commit 77f0aa2

Browse files
Adding debug logs and renaming variables
1 parent 789850a commit 77f0aa2

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Src/runcpp2/CompilingLinking.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ namespace
1414
bool compileAsExecutable,
1515
std::string& outScriptObjectFilePath)
1616
{
17+
ssLOG_FUNC_DEBUG();
18+
1719
std::string scriptDirectory = ghc::filesystem::path(scriptPath).parent_path().string();
1820
std::string scriptName = ghc::filesystem::path(scriptPath).stem().string();
1921
std::string runcpp2ScriptDir = runcpp2::ProcessPath(scriptDirectory + "/.runcpp2");
@@ -236,6 +238,8 @@ namespace
236238
bool linkAsExecutable,
237239
const std::string& exeExt)
238240
{
241+
ssLOG_FUNC_DEBUG();
242+
239243
std::string scriptName = ghc::filesystem::path(scriptPath).stem().string();
240244
std::string linkCommand;
241245

@@ -409,19 +413,19 @@ namespace
409413

410414
for(int i = 0; i < copiedDependenciesBinariesPaths.size(); ++i)
411415
{
412-
size_t foundIndex = copiedDependenciesBinariesPaths[i].find_last_of(".");
416+
size_t extensionFoundIndex = copiedDependenciesBinariesPaths[i].find_last_of(".");
413417

414-
if( foundIndex == std::string::npos &&
418+
if( extensionFoundIndex == std::string::npos &&
415419
!runcpp2::GetValueFromPlatformMap(profile.SharedLinkFile.Extension)->empty() &&
416420
!runcpp2::GetValueFromPlatformMap(profile.StaticLinkFile.Extension)->empty())
417421
{
418422
continue;
419423
}
420424

421425
//Check if this is a file we can link
422-
if(foundIndex != std::string::npos)
426+
if(extensionFoundIndex != std::string::npos)
423427
{
424-
std::string extension = copiedDependenciesBinariesPaths[i].substr(foundIndex);
428+
std::string extension = copiedDependenciesBinariesPaths[i].substr(extensionFoundIndex);
425429

426430
if( extension != *runcpp2::GetValueFromPlatformMap(profile.SharedLinkFile.Extension) &&
427431
extension != *runcpp2::GetValueFromPlatformMap(profile.StaticLinkFile.Extension))
@@ -611,4 +615,4 @@ bool runcpp2::CompileAndLinkScript( const std::string& scriptPath,
611615
}
612616

613617
return true;
614-
}
618+
}

Src/runcpp2/DependenciesSetupHelper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,12 @@ bool runcpp2::CopyDependenciesBinaries( const std::string& scriptPath,
526526
std::string currentSearchLibraryName = searchProperty.SearchLibraryNames.at(j);
527527
std::string currentSearchDirectory = searchProperty.SearchDirectories.at(k);
528528

529-
ssLOG_DEBUG("currentSearchDirectory: " << currentSearchDirectory);
530-
ssLOG_DEBUG("currentSearchLibraryName: " << currentSearchLibraryName);
531-
532529
if(!ghc::filesystem::path(currentSearchDirectory).is_absolute())
533530
currentSearchDirectory = dependenciesCopiesPaths[i] + "/" + currentSearchDirectory;
534531

532+
ssLOG_DEBUG("currentSearchDirectory: " << currentSearchDirectory);
533+
ssLOG_DEBUG("currentSearchLibraryName: " << currentSearchLibraryName);
534+
535535
std::error_code _;
536536
if( !ghc::filesystem::exists(currentSearchDirectory, _) ||
537537
!ghc::filesystem::is_directory(currentSearchDirectory, _))

0 commit comments

Comments
 (0)