Skip to content

Commit 33e3d26

Browse files
Merge pull request #56 from Neko-Box-Coder/DependencyChangeErrorFix
Fixing misleading error and equality typo for dependency
2 parents 78862cd + f142ff7 commit 33e3d26

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

Examples/CivetwebStaticWebServer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/* runcpp2
22
3+
BuildType: InternalExecutable
4+
35
Dependencies:
46
- Name: civetweb
57
Platforms: [DefaultPlatform]
@@ -18,8 +20,10 @@
1820
DefaultProfile:
1921
SearchLibraryNames: ["civetweb"]
2022
SearchDirectories: ["./output/src"]
21-
Setup: ["mkdir output", "cd output && cmake .. -DCIVETWEB_BUILD_TESTING=OFF -DCIVETWEB_ENABLE_ASAN=OFF"]
22-
Build: ["cd output && cmake --build . -j 16"]
23+
Setup:
24+
- "mkdir output"
25+
- "cd output && cmake .. -DCIVETWEB_BUILD_TESTING=OFF -DCIVETWEB_ENABLE_ASAN=OFF"
26+
- "cd output && cmake --build . -j 16"
2327
*/
2428

2529
extern "C" {

Src/runcpp2/CompilingLinking.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ namespace
616616
{
617617
ssLOG_WARNING( "Trying to link static dependency when script is being " <<
618618
"built as shared. Linking might not work on some platforms.");
619-
619+
ssLOG_WARNING( "If failing to link, consider using --executable instead");
620620
//TODO: Maybe revert the default back to executable?
621621
}
622622

Src/runcpp2/Data/DependencySource.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@ bool runcpp2::Data::DependencySource::Equals(const DependencySource& other) cons
104104
return git->Equals(*otherGit);
105105
}
106106
else
107-
{
108-
ssLOG_ERROR("Invalid DependencySource type");
109107
return false;
110-
}
111108
}
112109
else if(mpark::get_if<LocalSource>(&Source))
113110
{
@@ -118,10 +115,7 @@ bool runcpp2::Data::DependencySource::Equals(const DependencySource& other) cons
118115
return local->Equals(*otherLocal);
119116
}
120117
else
121-
{
122-
ssLOG_ERROR("Invalid DependencySource type");
123118
return false;
124-
}
125119
}
126120

127121
ssLOG_ERROR("Invalid DependencySource type");

Src/runcpp2/Data/ScriptInfo.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
383383
Cleanup.size() != other.Cleanup.size() ||
384384
Populated != other.Populated)
385385
{
386-
return true;
386+
return false;
387387
}
388388

389389
for(const auto& it : RequiredProfiles)
390390
{
391391
if( other.RequiredProfiles.count(it.first) == 0 ||
392392
other.RequiredProfiles.at(it.first) != it.second)
393393
{
394-
return true;
394+
return false;
395395
}
396396
}
397397

@@ -400,7 +400,7 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
400400
if( other.OverrideCompileFlags.count(it.first) == 0 ||
401401
!other.OverrideCompileFlags.at(it.first).Equals(it.second))
402402
{
403-
return true;
403+
return false;
404404
}
405405
}
406406

@@ -409,7 +409,7 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
409409
if( other.OverrideLinkFlags.count(it.first) == 0 ||
410410
!other.OverrideLinkFlags.at(it.first).Equals(it.second))
411411
{
412-
return true;
412+
return false;
413413
}
414414
}
415415

@@ -418,7 +418,7 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
418418
if( other.OtherFilesToBeCompiled.count(it.first) == 0 ||
419419
!other.OtherFilesToBeCompiled.at(it.first).Equals(it.second))
420420
{
421-
return true;
421+
return false;
422422
}
423423
}
424424

@@ -427,44 +427,44 @@ bool runcpp2::Data::ScriptInfo::Equals(const ScriptInfo& other) const
427427
if( other.IncludePaths.count(it.first) == 0 ||
428428
!other.IncludePaths.at(it.first).Equals(it.second))
429429
{
430-
return true;
430+
return false;
431431
}
432432
}
433433

434434
for(size_t i = 0; i < Dependencies.size(); ++i)
435435
{
436436
if(!Dependencies[i].Equals(other.Dependencies[i]))
437-
return true;
437+
return false;
438438
}
439439

440440
for(const auto& it : Defines)
441441
{
442442
if(other.Defines.count(it.first) == 0 || !other.Defines.at(it.first).Equals(it.second))
443-
return true;
443+
return false;
444444
}
445445

446446
for(const auto& it : Setup)
447447
{
448448
if(other.Setup.count(it.first) == 0 || !other.Setup.at(it.first).Equals(it.second))
449-
return true;
449+
return false;
450450
}
451451

452452
for(const auto& it : PreBuild)
453453
{
454454
if(other.PreBuild.count(it.first) == 0 || !other.PreBuild.at(it.first).Equals(it.second))
455-
return true;
455+
return false;
456456
}
457457

458458
for(const auto& it : PostBuild)
459459
{
460460
if(other.PostBuild.count(it.first) == 0 || !other.PostBuild.at(it.first).Equals(it.second))
461-
return true;
461+
return false;
462462
}
463463

464464
for(const auto& it : Cleanup)
465465
{
466466
if(other.Cleanup.count(it.first) == 0 || !other.Cleanup.at(it.first).Equals(it.second))
467-
return true;
467+
return false;
468468
}
469469

470470
return true;

mkdocs/docs/TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636

3737
## High Priority
3838

39+
- Rename "OtherFilesToBeCompiled" to "SourceFiles"
40+
- Expose/rename "InternalExecutableShared" and change BuildType to be platform map
41+
- This ties to the warning in `CompilingLinking.cpp:619`
3942
- Update `FileProperties.hpp` to use list of string for prefix and extension
4043
- Merge `SharedLinkFile` and `SharedLibraryFile`
4144
- Add the ability for user to specify custom substitution options which applies to all fields

0 commit comments

Comments
 (0)