[CMake] How to substitute zero in a variable
Timenkov Yuri
ytimenkov at gmail.com
Thu Sep 25 02:10:12 EDT 2008
On Thu, Sep 25, 2008 at 12:12 AM, Eric (Brad) Lemings <brad at rebit.com>wrote:
>
> Consider the following:
>
> CMakeLists.txt:
> set (ZERO 0)
> configure_file (
> ${CMAKE_SOURCE_DIR}/include/config.h.cmake
> ${CMAKE_BINARY_DIR}/include/config.h
> )
>
> ${CMAKE_SOURCE_DIR}/include/config.h.cmake:
> #cmakedefine ZERO @ZERO@
>
> When I run cmake, I get the following header file:
>
> ${CMAKE_BINARY_DIR}/include/config.h:
> #define ZERO
>
> How do I coax CMake to get the literal integer constant '0' replaced for
> @ZERO@?
I suppose this is because #cmakedefine behavior (If I understand correctly
configure_file's documentation). Try simple #define ZERO @ZERO@
>
>
> Thanks.
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080925/5aec4d8b/attachment.htm>
More information about the CMake
mailing list