[CMake] CPACK_MONOLITHIC_INSTALL not handled at runtime?

Eric Noulard eric.noulard at gmail.com
Mon Nov 15 02:19:19 EST 2010


2010/11/14 Vladislav Vaintroub <vvaintroub at googlemail.com>:

>> Those vars may be set at CMake-time or at CPack-time.
>>
>> What do you think?
>
> Yes, sounds like a good idea, it allows the most flexibility.   Re. variables , I guess  CPACK_MONOLITHIC_INSTALL={ON|OFF} and
> CPACK_<GENERATOR>_MONOLITHIC_INSTALL ={ON|OFF} would already cover all possible scenarios.
> I.e MONOLITHIC_INSTALL=OFF  is the same
> as component install = ON, right?

It could be if We can check that MONOLITHIC_INSTALL is not set at ALL.

We need 3 state:
- nothing set --> default builtin behavior for each generator
- MONOLITHIC_INSTALL=ON --> default to monolithic for all generators
- MONOLITHIC_INSTALL=OFF or COMPONENT_INSTALL=ON --> default to
component for all generators

I'll have to check whether if it's easy or not to distinguish between
MONOLITHIC_INSTALL=OFF and MONOLITHIC_INSTALL not set.

Even if it's possible I think it would be easier to think about
"positive" logic than negative one.
The better way to handle the 3-state case may be:
CPACK_INSTALL_BEHAVIOR=MONOLITHIC | COMPONENT | DEFAUILT | <NoSet>

but historically they are more ON/OFF YES/NIO vars in CMake than
multi-valued (enum) vars.
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list