AW: [odb-users] --odb-epilogue option
Christian Sell
christian at gsvitec.com
Tue Dec 16 07:58:45 EST 2014
Never mind. It was a matter of passing the quotes to the compiler, which can
(only) be ensured by using the VERBATIM option on the CMake
"add_custom_command" command, like so:
foreach(_file ${ODB_INFILES})
string(REPLACE ".h" "-odb.cpp" gencppfile ${_file})
string(REPLACE ".h" "-odb.h" genhppfile ${_file})
string(REPLACE ".h" "_pragmas.h" pragmafile ${_file})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${gencppfile}
COMMAND odb --std c++11 --database sqlite --cxx-suffix .cpp
--hxx-suffix .h --generate-query --generate-schema --odb-epilogue "#include
\"${pragmafile}\"" ${_file}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${_file}
COMMENT "\nrunning odb on ${_file}"
VERBATIM
)
list(APPEND ODB_GENFILES ${gencppfile} ${genhppfile})
endforeach()
-----Ursprüngliche Nachricht-----
Von: Boris Kolpackov [mailto:boris at codesynthesis.com]
Gesendet: Dienstag, 16. Dezember 2014 13:42
An: Christian Sell
Cc: odb-users at codesynthesis.com
Betreff: Re: [odb-users] --odb-epilogue option
Hi Christian,
Christian Sell <christian at gsvitec.com> writes:
> odb --std c++11 --database sqlite --cxx-suffix .cpp --hxx-suffix .h
> --generate-query --generate-schema --odb-epilogue "#include
> \"${pragmafile}\"" ${_file}
Can you add the -v option to the above command line and then show the g++
command line that the ODB compiler prints (starts after the line saying
"Compiling ${_file}").
Boris
More information about the odb-users
mailing list