[CMake] configure_file - false vs 0

2009-08-09 Thread James C. Sutherland
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

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread Michael Wild
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

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread James C. Sutherland
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 $

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread James C. Sutherland
On Aug 9, 2009, at 10:33 AM, James C. Sutherland wrote: 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(

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread Michael Wild
On 9. Aug, 2009, at 18:39, James C. Sutherland wrote: On Aug 9, 2009, at 10:33 AM, James C. Sutherland wrote: 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

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread James C. Sutherland
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 */

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread Bill Hoffman
James C. Sutherland wrote: #define TEST_VAR_VALUE ${TEST_VAR_VALUE} is what you want. But if I do set( TEST_VAR_VALUE 0 ) then this results in TEST_VAR_VALUE being undefined rather than having the value of 0 as I want. If the value is anything other than zero it works. This is what I

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread Michael Wild
On 9. Aug, 2009, at 22:49, 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

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread Mike Jackson
On Sun, Aug 9, 2009 at 5:07 PM, Bill Hoffmanbill.hoff...@kitware.com wrote: James C. Sutherland wrote: #define TEST_VAR_VALUE ${TEST_VAR_VALUE} is what you want. But if I do  set( TEST_VAR_VALUE 0 ) then this results in TEST_VAR_VALUE being undefined rather than having the value of 0 as

Re: [CMake] configure_file - false vs 0

2009-08-09 Thread James C. Sutherland
Aah, now I see what you want... #define TEST_VAR_VALUE ${TEST_VAR_VALUE} is what you want. But if I do set( TEST_VAR_VALUE 0 ) then this results in TEST_VAR_VALUE being undefined rather than having the value of 0 as I want. If the value is anything other than zero it works. This is