Re: [AD] cmake reorganization (was: 4.9 on OSX)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:

If you didn't know, pretty much everything is in the top-level
CMakeFiles.txt file.  I will try to answer any questions about it.

I want to discuss this. I had to modify CMakeFiles.txt when adding MSVC support and I've had some hard time to understand how it works. Besides cmake syntax being very ugly IMO, I think there is something that could be done to improve readability.

First, there is this set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) directive which supposedly allows more standard
if(VAR)
   ...
else()
   ...
endif() style.

if(VAR)
   ...
else(VAR)
   ...
endif(VAR) is confusing and unconventional. Perhaps it is easier to see which "endif" belongs to which condition, but that should not be in the syntax. We should force ourselves to add a comment: endif() #VAR.

Another thing I'd propose is to split CMakeFiles.txt into multiple files. I haven't thought of the structure yet in detail, but I think that each platform should have its own main file (something we used to have with makefiles) and a file(s) containing some common routines.

Should also mention that I haven't spent a single moment on reading cmake docs, and have never worked with cmake before, so I might be missing a point.


--
Milan Mimica
http://sparklet.sf.net




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/