[Cmake] multiple choice option

Klaas Holwerda kholwerd at xs4all . nl
Thu, 23 Oct 2003 16:40:25 +0200


Hi All,

Is there a way to have a multiple choice option in Cmake(SetUp)?
Like choosing from a list of  several possibilities, where this lis can 
be generated
on the fly ( list of existing directories are whatever) by Cmake.

Why,  i try to explain down here, but essential it is to let the user 
choose a specific
setup of a wxWindows library version.

For wxWindows the number of configurations ( unicode/debug/dll etc etc.)
can be almost endless, this because every change in its setup.h leads to 
a new unique library.
The library and setup.h file generated for each unique configuration are 
essential
to generate a proper Vc project with cmake.
Some special configurations lead to fixed named directories, by 
wxWindows its buyild system, but others
can be named as the builder of that specific wxWindows library desires.

I can detect the "default configurations", but i would prefer to have a 
list of $WXWIN)/lib its subdirectories,
and display them in Cmake as a multiple choice option.
(if possible with special comments added, to explain what is likely in
each library configuration).

e.g the list could be:

- $(WXWIN)/lib/msw  ( non debug )
- $(WXWIN)/lib/mswd ( debug )
- $(WXWIN)/lib/mswu ( unicode )
- $(WXWIN)/lib/mswud ( unicode debug )
- $(WXWIN)/lib/mswdllud ( dll unicode debug )
- $(WXWIN)/lib/mswMyOwnLibSetup ( my special setup which is not a
default configuration )
- $(WXWIN)/lib/mswLibSetupX ( a special setup which is not a default
configuration )
etc. etc.

So if this is possible, one of the generated wxWindows library
configuration can simply be choosen by the user.
After that Cmake will only create a project file/makefiles for that
specific configuration.

Combining every type of unique configuration inside one VC project file,
i find a bad solution.
( debug/release/dll makes still sence, but for all possible
configuration it makes no sence).
Especially when looking from how Cmake works in case of makefiles.
One should be able to generate makefiles and/or project files for any
specific setup of library/libraries.

If the above is wrong thinking ;-), advice is appreciated.

Thanks,

Klaas