At 10:31 AM 10/9/2003, Ian Scott wrote:
>> -----Original Message-----
>> From: Brad King [mailto:brad.king@...]
>> The approach we plan to take is to convert the autoconf
>> try-compile tests
>> over to individual .cxx files. Then they can be shared between the
>> configure script and the CMake build process. We can do the
>> and the CMake test implementation, but someone else will have
>> to modify
>> the autoconf code to use the separate .cxx files. Once CMake
>> is used to
>> drive the vcl configuration process, it will be usable for Windows
>> compilers automatically.
>This is an obvious improvement that has been waiting for someone to have
>enough interest in.
>One question though. Would it be really necessary for the legacy autoconf
>code to use the separate .cxx files? Given how rarely the configure file has
>changed over the past few years, I would have though that we could leave the
>legacy code, and only modify it to use the separate .cxx files if we need to
>make a major *functional change to the configuration system. Or do you plan
>to make major *functional changes?
No major change is planned. It was just thought that to avoid code duplication,
it would be best to share if possible. However, that is up to you folks. We
actually have started on this. We have modified the configure.in a bit so that
it generates the cmake code for us. So, it generates a test.cxx file with all
the tests in it, but they are separated with ifdef's. Something like:
Then to try the test, you compile with -DVCL_TEST_BOOL and you get just that test,but
the code is all in one .cxx file for easy maintenance.
To test it, we use cmake and configure to generate the same .h files using the same
.h.in files and make sure we are getting the same answers.
So, it is up to you if you want to back fit the autoconf script.
>* by functional change I mean a change that would produce a different vcl,
>as distinct from an implementation change to the way the configure system
>> compilers. Then new compilers will be supported automatically.
>That would be very nice.
As a phase two of this process, it might be nice to add more try compile tests, and
remove more of the ifdef thisCOMPILER stuff that is still in vcl.