From c59f08863e5a131e2df6ddc9acd4bd7366ebe6eb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 15 Oct 2018 23:30:17 +0200 Subject: Fix tests when main project has only header files --- backend/ninja/Ninja.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backend/ninja') diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 3e69ef1..4202a82 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1294,11 +1294,13 @@ namespace backend // TODO: For now zig projects (zig object files) are built with c/c++ compiler, // they should be built with zig if project only contains zig files. // But how to combine object files with zig? build-exe only wants to accept .zig files - string projectGeneratedBinary = "\""; - projectGeneratedBinary += savePathUtf8; - projectGeneratedBinary += "/"; + string projectGeneratedBinary; if (!sourceFiles.empty() && !zigTest) { + projectGeneratedBinary = "\""; + projectGeneratedBinary += savePathUtf8; + projectGeneratedBinary += "/"; + string noUndefinedFlag; if(!onlyZigFiles) { -- cgit v1.2.3