I want to use a value declared in my CMakeLists.txt in my C++ code. I\'ve tried to do like that :
ADD_DEFINITIONS( -D_MYVAR=1 )
and
<
add_definitions ( -DVARNAME=... )
is the correct way of using add_definitions.
To check for a constant then, use
#ifdef VARNAME ... #endif