Commit b5646b50 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

[trac901] Fix compilation from different dir

Cherry-pick from #744
parent d4d910b2
......@@ -261,7 +261,7 @@ writeHeaderFile(const string& file, const string& prefix,
const vector<string>& ns_components, MessageDictionary& dictionary)
{
Filename message_file(file);
Filename header_file(message_file.useAsDefault(".h"));
Filename header_file(Filename(message_file.name()).useAsDefault(".h"));
// Text to use as the sentinels.
string sentinel_text = sentinel(header_file);
......@@ -358,7 +358,7 @@ writeProgramFile(const string& file, const string& prefix,
const vector<string>& ns_components, MessageDictionary& dictionary)
{
Filename message_file(file);
Filename program_file(message_file.useAsDefault(".cc"));
Filename program_file(Filename(message_file.name()).useAsDefault(".cc"));
// Open the output file for writing
ofstream ccfile(program_file.fullName().c_str());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment