Skip to content

stip() function has no effect on @OUTPUT@ ? #13943

Answered by eli-schwartz
vpoinot asked this question in Q&A
Discussion options

You must be logged in to vote
'@OUTPUT@'.strip('.h')

Is a string replacement function that results in the string '@OUTPUT@', which is in turn passed as an argument to the custom target. The custom target function itself specially handles string values containing replacement tokens.

The actual output you want here is @OUTDIR@/schema, essentially. All that @OUTPUT@ does specially is handle prepending the output directory to the same string you used as the output: kwarg.

You can use @OUTPUT@/@BASENAME@ to strip the .sql programmatically from the input filename, or just hardcode "schema" here.

I confess I'm surprised by this sqlite2cpp interface. Usually if a tool wants to choose the output filename itself it takes a dir…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vpoinot
Comment options

Answer selected by vpoinot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants