On Aug 9, 2009, at 10:20 AM, Michael Wild wrote:
On 9. Aug, 2009, at 18:06, James C. Sutherland wrote:
In my configure.h.in file I have:
#cmakedefine TEST_VAR_VALUE
In my CMakeLists.txt file I have:
configure_file( ${PROJECT_SOURCE_DIR}/src/config.h.in $
{PROJECT_SOURCE_DIR}/src/configure.h )
set( TEST_VAR_VALUE "0" )
This results in a configure.h file containing:
/* #undef TEST_VAR_VALUE */
But what I would like is:
#define TEST_VAR_VALUE 0
So basically cmake is seeing the value of TEST_VAR_VALUE as 0 and
treating it as "false" rather than a value.
Any ideas how to accomplish this?
James
Use the (undocumented) #cmakedefine01.
I already submitted a patch, and the documentation has been fixed in
CVS.
Michael
Thanks! That did it.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake