From 0a170d457aec085c5ec739a8e6eb7b636535b247 Mon Sep 17 00:00:00 2001 From: Matthew Asplund Date: Sat, 11 Jan 2020 20:10:26 -0800 Subject: [PATCH 1/2] Add incremental builds to no input file nodes --- Source/Core/Build/BuildUtilities.h | 4 +++- Source/Core/Build/Runner/BuildRunner.h | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Source/Core/Build/BuildUtilities.h b/Source/Core/Build/BuildUtilities.h index 6d3d8018..22e88f9b 100644 --- a/Source/Core/Build/BuildUtilities.h +++ b/Source/Core/Build/BuildUtilities.h @@ -58,7 +58,9 @@ namespace Soup::Build auto program = Path("C:/Windows/System32/cmd.exe"); auto workingDirectory = Path(""); auto inputFiles = std::vector({}); - auto outputFiles = std::vector({}); + auto outputFiles = std::vector({ + directory, + }); // Build the arguments std::stringstream arguments; diff --git a/Source/Core/Build/Runner/BuildRunner.h b/Source/Core/Build/Runner/BuildRunner.h index a8e672db..35ad4502 100644 --- a/Source/Core/Build/Runner/BuildRunner.h +++ b/Source/Core/Build/Runner/BuildRunner.h @@ -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) From 1fd92f89abed1ce4bc070f0089dfda0e881e826d Mon Sep 17 00:00:00 2001 From: Matthew Asplund Date: Sat, 11 Jan 2020 20:11:49 -0800 Subject: [PATCH 2/2] Update version and add optional build tools requirement --- Docs/GettingStarted.md | 5 ++++- Source/Client/Commands/VersionCommand.h | 2 +- Source/Client/Recipe.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Docs/GettingStarted.md b/Docs/GettingStarted.md index 2ff0c87c..cf217252 100644 --- a/Docs/GettingStarted.md +++ b/Docs/GettingStarted.md @@ -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 diff --git a/Source/Client/Commands/VersionCommand.h b/Source/Client/Commands/VersionCommand.h index f1ba7be4..ea9e59d6 100644 --- a/Source/Client/Commands/VersionCommand.h +++ b/Source/Client/Commands/VersionCommand.h @@ -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: diff --git a/Source/Client/Recipe.json b/Source/Client/Recipe.json index 330dfd41..563b5825 100644 --- a/Source/Client/Recipe.json +++ b/Source/Client/Recipe.json @@ -1,6 +1,6 @@ { "name": "Soup", - "version": "0.4.6", + "version": "0.4.7", "type": "Executable", "dependencies": [ "../Core/",