Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Dogolazky committed Jan 30, 2011
1 parent 9d2dcab commit 9d4841f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
13 changes: 10 additions & 3 deletions iodata.prf
@@ -1,8 +1,15 @@
LIBS += -liodata

QMAKE_EXTRA_COMPILERS += iodata_type_to_cxx
QMAKE_EXTRA_COMPILERS += iodata_type_to_cxx iodata_type_to_h

iodata_type_to_cxx.input = IODATA_TYPES
iodata_type_to_cxx.output = ${QMAKE_FILE_IN}.c++
iodata_type_to_cxx.output = iodata_${QMAKE_FILE_IN_BASE}.cpp
iodata_type_to_cxx.variable_out = SOURCES
iodata_type_to_cxx.commands = iodata-type-to-c++ ${QMAKE_FILE_IN}
iodata_type_to_cxx.commands = iodata-type-to-c++ ${QMAKE_FILE_IN} -o iodata_${QMAKE_FILE_IN_BASE}.cpp -d ${QMAKE_FILE_IN}.h

iodata_type_to_h.input = IODATA_TYPES
iodata_type_to_h.output = ${QMAKE_FILE_IN}.h
iodata_type_to_h.variable_out = HEADERS
iodata_type_to_h.commands = iodata-type-to-c++ ${QMAKE_FILE_IN} -o iodata_${QMAKE_FILE_IN_BASE}.cpp -d ${QMAKE_FILE_IN}.h

# iodata-type-to-c++ ${QMAKE_FILE_IN} -d ${QMAKE_FILE_OUT}
8 changes: 4 additions & 4 deletions type-to-cxx/type-to-cxx.cpp
Expand Up @@ -124,7 +124,7 @@ int main_try(int ac, char **av)
log_error("only a single '-o' option allowed") ;
return 1 ;
}
c_output = optopt ;
c_output = optarg ;
}
else if(c=='d')
{
Expand All @@ -133,7 +133,7 @@ int main_try(int ac, char **av)
log_error("only a single '-d' option allowed") ;
return 1 ;
}
h_output = optopt ;
h_output = optarg ;
}
else
{
Expand Down Expand Up @@ -190,7 +190,7 @@ int main_try(int ac, char **av)

if (iodata::storage::write_string_to_file(h_output.c_str(), header.c_str()) < 0)
{
log_error("can't write to '%s': %m", h_output.c_str()) ;
log_error("can't write header file to '%s': %m", h_output.c_str()) ;
failure = true ;
}
}
Expand All @@ -206,7 +206,7 @@ int main_try(int ac, char **av)

if (iodata::storage::write_string_to_file(c_output.c_str(), program.c_str()) < 0)
{
log_error("can't write to '%s': %m", c_output.c_str()) ;
log_error("can't write c++ output to '%s': %m", c_output.c_str()) ;
failure = true ;
}
}
Expand Down

0 comments on commit 9d4841f

Please sign in to comment.