[CMake] Setting up Visual Studio project structure

Michael Bieber onsager at gmx.net
Mon Mar 26 15:49:54 EST 2007


HS> --------------------
HS> #!/bin/sh
HS> for i in *.c; do
HS>   echo <whatever>
HS> done
HS> --------------------

HS> Something like that? You can write the proper file lists to an extra .cmake
HS> file and include that into the CMakeLists.txt file or use a template file.

Yes, and I'm able to write these things even on Windows (using Python or
whatever to avoid cross-platform issues). But it is not exactly the
point. Maybe I'm too demanding, but what I'm expecting from a build
system is, that it supports common requirements for professional
software development out of the box.
We are ~20 developers here writing code and adding/deleting files - not
longer daily (it's more stabelized now), but say still weekly. I'm
simply hesitating in spending too much time for these operations, it is
something very natural for development in general (I always liked the
Unix concept of directories as special files and deleting/adding as a
special write operation for these files).
Of course, some tweaks are always necessary, but a bit more help here
would be a good idea IMO. This is not yet a particular big project, but
it is not small too and the inherent dynamic is by no means negligible.
BTW, i cannot find the FAQ entry recommending not to use directory
parsing. I found some remarks in the lists archive, but honestly - they
are not very convincing to me. I see mistakenly included and 'spurious'
files not as a particular hard problem. At least the advantages more
than outweigh these issues IMO.
The second point is - cmake brags (sorry for the word, maybe it is too
strong, I'm not a native speaker) with writing Visual Studio project
files. These are - almost per definition - projects for *humans*, so
navigational structures like sub-directories are necessary for any
non-trivial project. This is of course not a requirement for pure
compiling, for anything with human interaction it is. I know in the
meantime, that cmake has a macro feature, probably able to achieve my
demands. I would like suggest however, that it becomes an integral
stable part of cmake's Visual Studio support (with prominent
documentation). For the moment I'm not yet in the position to write it
down in a robust way.

HS> Should cmake really handle all specialties (like moc, uic and rcc for Qt) for
HS> creating such file lists?

Maybe, I'm a bit away from Qt programming at the moment.

Micha
-- 



More information about the CMake mailing list