[CMake] config dependent defines

Michael Wild themiwi at gmail.com
Mon Oct 18 05:09:39 EDT 2010


On 18. Oct, 2010, at 10:52 , Adam J Richardson wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>> Your users will hate you for that, because they will not be able to
>> override the compile-flags without modifying the CMakeLists.txt file.
>> 
>> You can set the COMPILE_DEFINITIONS_DEBUG property on individual
>> targets using SET_TARGET_PROPERTIES() or on directories with
>> SET_DIRECTORY_PROPERTIES.
> 
> I've been meaning to ask, Michael. Exactly how would a user expect to
> override the defaults without modifying the CMakeLists.txt file? Isn't
> that the easiest way to override the defaults?
> 
> Is it because of the FORCE option they will hate him?
> 
> Regards,
> Adam J Richardson
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> 
> iEYEARECAAYFAky8Cr8ACgkQSUH6dLOqvqnYUgCfbZB1KtewDVQ/ZMdPeeYDHD6V
> KFoAn3M3nETZeJlnW8yLAYt4xq6Lq7sO
> =ByUi
> -----END PGP SIGNATURE-----


A user expects to be able to modify the contents of the CMakeCache.txt file (either manually, through ccmake or cmake-gui), including the compilation flags. If you use the FORCE option, you always overwrite his choice, driving him insanely mad ;-)


Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101018/37b48c55/attachment-0001.pgp>


More information about the CMake mailing list