[CMake] Way to use precompilation directive on cmake and conditionnal linking
Nadir SOUALEM
nadir.soualem at irisa.fr
Tue Mar 24 12:11:21 EDT 2009
Tyler wrote:
> On Tue, Mar 24, 2009 at 04:55:53PM +0100, Nadir SOUALEM wrote:
>
>> Thank you Tyler , i use the same method for linking, but i thought there
>> was a better way than:
>>
>> if (WITH_OPENGL)
>> add_definitions (-DOPENGL)
>> else (WITH_OPENGL)
>> add_definitions (-DNO_OPENGL)
>> endif (WITH_OPENGL)
>>
>> for preprocessing vars ....
>>
>
> Glad I could help, but now I'm curious: what's so bad about this
> approach that you're looking for another way to do it?
>
> tyler
>
Not so bad, but it would be very nice to do some things such adding
preprocessing on command line calls:
cmake -DPREPROCCESSING_VAR
:-)
Thank you Tyler.
--
Nadir SOUALEM
Ingénieur INRIA - Équipe SAGE
More information about the CMake
mailing list