[CMake] Use of CMake OPTION in code
Pelt, R.F.P. van
R.F.P.v.Pelt at tue.nl
Tue Oct 21 05:16:25 EDT 2008
Dear all,
Recently I have added an option to a CMake project that I'm using.
For example:
OPTION(BUILD_EXTRA_STUFF "Build extra stuff." ON)
Whenever this is enables, this also changes a couple of things in
the code, which is currently implemented with a hard define.
For example:
#define EXTRA_STUFF
#ifdef EXTRA_STUFF
Is there a way that I can 'propagate' the BUILD_EXTRA_STUFF option
to my code, so that I can implements as follows:
#ifdef BUILD_EXTRA_STUFF
Thanks for the help.
Best regards,
Roy
More information about the CMake
mailing list