Skip to content

Commit

Permalink
Fix compiler failing to compile when target application was created f…
Browse files Browse the repository at this point in the history
…rom a single source filesystem

See crosire#16
  • Loading branch information
crosire committed Jan 8, 2019
1 parent fe6bd16 commit 0db40ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/blink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ std::string blink::application::build_compile_command_line(const std::filesystem
}
});

cmdline += ' ';
// Make sure to only compile and not link too
cmdline += " /c ";

// Remove some arguments from the command-line since they are set to different values below
const auto remove_arg = [&cmdline](std::string arg) {
Expand Down Expand Up @@ -395,7 +396,7 @@ std::string blink::application::build_compile_command_line(const std::filesystem

// Always write to a separate object file since the original one may be in user by a debugger
object_file = source_file;
object_file.replace_extension(".obj");
object_file.replace_extension("temp.obj");

// Append input source file to command-line
cmdline += '\"' + source_file.string() + '\"';
Expand Down

0 comments on commit 0db40ed

Please sign in to comment.