[CMake] configure_file without continuous re-build
Daniel Blezek
Blezek.Daniel at mayo.edu
Tue Jan 12 17:26:36 EST 2010
Hmmm, I'll dig a little deeper to see what's hapening.
Thanks,
-dan
On 1/12/10 4:25 PM, "Bill Hoffman" <bill.hoffman at kitware.com> wrote:
> Daniel Blezek wrote:
>> Hi Mike,
>>
>> Sorry, I guess I wasn't quite clear. The re-builds occur when I touch any
>> CMakeLists.txt file in the entire project. Since we're under active
>> development, new source files are being added fairly frequently. I didn't
>> want re-builds to trigger each time a developer adds a new class.
>>
>> I believe that configure_file() is re-run whenever CMake does a
>> "Generate", not only when the .in file is modified. On a normal build this
>> isn't an issue, but is a problem for us.
>>
>> Putting the "NOT EXISTS" guard seems to solve the problem, but is a little
>> ugly.
>>
> configure_file will only write the file if it changes. You must be
> changing the file each time cmake is run, which is bad....
>
> -Bill
--
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center
P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu
Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org
More information about the CMake
mailing list