[CMake] Patch to apply! Changing the default name"CMakeLists.txt"!

Bill Hoffman bill.hoffman at kitware.com
Sun Jan 13 22:04:15 EST 2008


Brandon Van Every wrote:
> On Jan 13, 2008 4:23 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>> Martin Lütken wrote:
>>> That's great then. Do you know who to address in order to get the patch
>>> into the CVS code ?
>>>
>> Actually, what about something like this:
>>
>> # CMakeLists.txt
>> INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/${CML_NAME}")
>>
>> cmake /path/to/proj -DCML_NAME:STRING="mycmake1.txt"
>> cmake /path/to/proj -DCML_NAME:STRING="mycmake2.txt"
>>
>>
>> No changes needed to CMake at all....
> 
> "Not needing to change CMake" may be useful for my own purposes, as I
> have to ship with production versions of CMake, and I was planning to
> wrap command line ugliness in a script anyways.  But CMake is changed
> all the time in order to better it.  I don't see how "let's leave well
> enough alone" is an argument in this case.  In terms of command line
> elegance, your solution leaves much to be desired over
> 
> cmake -f mycmake1.txt
> cmake -f mycmake2.txt
> 
> Especially in the eyes of the Autoconf + GMake crowd, whom we'd like
> to convert.  Do you have a serious objection to CMake having a -f
> flag?
> 
> 

There is already a way to do the same thing. Martin, perhaps if you 
discussed the use case better so we could understand what you are trying 
to do.   Many people will run CMake from a GUI and will not be giving a 
-f flag.  With the patch there would be no way to build a project via 
one of the GUI's if it required changing the name of the file.  If you 
had two or more sets of cmake files in the same source tree, how would 
that work?

-Bill


More information about the CMake mailing list