Skip to content

Commit

Permalink
Merge pull request #13 from mwasplund/mwasplund/fix-bug-incremental-n…
Browse files Browse the repository at this point in the history
…o-input

Mwasplund/fix bug incremental no input
  • Loading branch information
mwasplund authored Jan 12, 2020
2 parents 2132364 + 1fd92f8 commit d9630e0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ Note: The end goal is to have Soup running on all platforms building for any tar
Note2: While clang will work, there is still work to auto-detect an installation so MSVC is the suggested target compiler.

## Requirements
* [Visual Studio 2019 ](https://visualstudio.microsoft.com/downloads/) with "Desktop development with c++" workload
* Build Tools
* [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) with "Desktop development with c++" workload.
* OR
* [Build Tools For Visual Studio 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) with "c++ build tools" workload.
* [Latest Release](https://github.com/mwasplund/Soup/releases)

## Setup
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/Commands/VersionCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace Soup::Client

// TODO var version = Assembly.GetExecutingAssembly().GetName().Version;
// Log::Message($"{version.Major}.{version.Minor}.{version.Build}");
Log::HighPriority("0.4.6");
Log::HighPriority("0.4.7");
}

private:
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/Recipe.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Soup",
"version": "0.4.6",
"version": "0.4.7",
"type": "Executable",
"dependencies": [
"../Core/",
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Build/BuildUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ namespace Soup::Build
auto program = Path("C:/Windows/System32/cmd.exe");
auto workingDirectory = Path("");
auto inputFiles = std::vector<Path>({});
auto outputFiles = std::vector<Path>({});
auto outputFiles = std::vector<Path>({
directory,
});

// Build the arguments
std::stringstream arguments;
Expand Down
16 changes: 16 additions & 0 deletions Source/Core/Build/Runner/BuildRunner.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,22 @@ namespace Soup::Build
}
}
}
else
{
// Since there are no input files, the best we can do for an
// incremental build is check that the output exists
for (auto& file : node.GetOutputFiles())
{
auto filePath = Path(file);
auto relativeOutputFile = filePath.HasRoot() ? filePath : Path(node.GetWorkingDirectory()) + filePath;
if (!System::IFileSystem::Current().Exists(relativeOutputFile))
{
Log::Info("Output target does not exist: " + relativeOutputFile.ToString());
buildRequired = true;
break;
}
}
}
}

if (buildRequired)
Expand Down

0 comments on commit d9630e0

Please sign in to comment.