[Cmake] use of cmake options in source code
Jan Woetzel
jw at mip . informatik . uni-kiel . de
Thu, 28 Aug 2003 10:55:22 +0200
M=F3nica Hern=E1ndez Gim=E9nez wrote:
> OPTION(HAS_VTK "build with VTK" ON)
> #ifdef HAS_VTK
> How can the source code know that the option HAS_VTK is defined?
You can generate a conditional definition with ADD_DEFINITION( -DHAS_VTK =
),
see the docu for details.
Regards,
Jan.
--=20
Dipl.-Ing. Jan Woetzel
--------------------------------------------------
University of Kiel
Institute of Computer Science and Applied Mathematics
Hermann-Rodewald-Str. 3 [room 401]
24098 Kiel/Germany
--------------------------------------------------
Phone +49-431-880-1418
Fax +49-431-880-4054
Mob. +49-179-2937346
--------------------------------------------------
Url www.mip.informatik.uni-kiel.de/~jw
Email jw at mip . informatik . uni-kiel . de