Re: [creduce-dev] cmake bug?
I'm currently on vacation but once I'm back next week I can have a look as well if it's still unsolved. Moritz > On 31 Jan 2018, at 05:39, John Regehr wrote: > > I have weak cmake skills but can try to help. > > In any case I just added this as an item on the TODO list so we don't forget, > in case we don't do it right away. > > John > > > On 01/30/2018 08:31 PM, Eric Eide wrote: >> John Regehr writes: >>> In souper we have similar foo.in -> foo transformations doing some >>> substitutions that do get run at "make" time. I don't know if there's >>> something special about C-Reduce that makes this unworkable. >> Now that you mention it, I vaguely remember trying `configure_file` and >> failing. I forget why I failed. Probably because I don't know what I'm >> doing. >> Maybe I should try again! >> I vaguely recall that one problem was that `configure_file` doesn't let one >> specify that the output should be executable. But I think I had problems >> with >> the actual substitutions, too? >> Eric.
Re: [creduce-dev] cmake bug?
I have weak cmake skills but can try to help. In any case I just added this as an item on the TODO list so we don't forget, in case we don't do it right away. John On 01/30/2018 08:31 PM, Eric Eide wrote: John Regehr writes: In souper we have similar foo.in -> foo transformations doing some substitutions that do get run at "make" time. I don't know if there's something special about C-Reduce that makes this unworkable. Now that you mention it, I vaguely remember trying `configure_file` and failing. I forget why I failed. Probably because I don't know what I'm doing. Maybe I should try again! I vaguely recall that one problem was that `configure_file` doesn't let one specify that the output should be executable. But I think I had problems with the actual substitutions, too? Eric.
Re: [creduce-dev] cmake bug?
John Regehr writes: > In souper we have similar foo.in -> foo transformations doing some > substitutions that do get run at "make" time. I don't know if there's > something special about C-Reduce that makes this unworkable. Now that you mention it, I vaguely remember trying `configure_file` and failing. I forget why I failed. Probably because I don't know what I'm doing. Maybe I should try again! I vaguely recall that one problem was that `configure_file` doesn't let one specify that the output should be executable. But I think I had problems with the actual substitutions, too? Eric. -- --- Eric Eide . University of Utah School of Computing http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
Re: [creduce-dev] cmake bug?
Thanks, I guess I just hadn't run into this before! In souper we have similar foo.in -> foo transformations doing some substitutions that do get run at "make" time. I don't know if there's something special about C-Reduce that makes this unworkable. This is the mechanism we use there: https://cmake.org/cmake/help/v3.0/command/configure_file.html John On 01/30/2018 07:32 PM, Eric Eide wrote: John Regehr writes: There's something weird going on where the "creduce" file isn't getting generated from "creduce.in" after I modify the latter. So I change creduce.in, run "make install", and then I just get the old version of the file. I can get the newer version if I remove my build directory and run cmake again. Might this be related to recent changes? Anyway, "not an unknown bug." I guess it's not a feature since it's not documented :-/.
Re: [creduce-dev] cmake bug?
> John Regehr writes: > >> There's something weird going on where the "creduce" file isn't getting >> generated from "creduce.in" after I modify the latter. So I change >> creduce.in, run "make install", and then I just get the old version of the >> file. I can get the newer version if I remove my build directory and run >> cmake again. Might this be related to recent changes? Anyway, "not an unknown bug." I guess it's not a feature since it's not documented :-/. -- --- Eric Eide . University of Utah School of Computing http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX
Re: [creduce-dev] cmake bug?
John Regehr writes: > There's something weird going on where the "creduce" file isn't getting > generated from "creduce.in" after I modify the latter. So I change > creduce.in, run "make install", and then I just get the old version of the > file. I can get the newer version if I remove my build directory and run > cmake again. Might this be related to recent changes? tl;dr run cmake again? `creduce` is generated from `creduce.in` when you run cmake, not when you run make. I.e., it is generated at "configure time," not "build time." This is different than the Autoconf-based path, where `creduce` is generated when make is run. AFAIK, there is not a cmake command that is the equivalent of "run sed on this file when make is run." Cmake can do substitutions, but of couse this happens when cmake itself is run. I agree with you that it would be preferable for `creduce` to be generated when make is run, as in the Autoconf-based path. I don't know how to do this portably. I would be happy to be educated! I forget if simply running cmake again is good enough to do what you want. Eric. -- --- Eric Eide . University of Utah School of Computing http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX