; is the CMake list element separator character. The ; are still there
in the variable, you probably just can't see them with your processing code
that comes after reading in the file...
You can replace semi-colons like this with escaped semi-colons:
STRING(REGEX REPLACE ; ; ZCONF_H
What I did (and solved the issue) is:
file(READ zconf.in.h ZCONF_H)
STRING(REPLACE HAVE_STD_HEADERS_H ${HAVE_STD_HEADERS_H} ${ZCONF_H})
file(WRITE zconf.test ${ZCONF_H})
Especially the quotes around the variable are important as otherwise CMake
think it's an array and not a string... I think :)
Steven Van Ingelgem wrote:
What I did (and solved the issue) is:
file(READ zconf.in.h ZCONF_H)
STRING(REPLACE HAVE_STD_HEADERS_H ${HAVE_STD_HEADERS_H} ${ZCONF_H})
file(WRITE zconf.test ${ZCONF_H})
Especially the quotes around the variable are important as otherwise
CMake think it's an array
On Sunday 22 March 2009, Steven Van Ingelgem wrote:
Hi,
I'm trying to read in a C-header file with file(READ):
file(READ zconf.in.h ZCONF_H)
!! But this variable contains no ; whatsoever?
How can I ask to read it in completely?
Can you please explain what problem you have ? It's not
Hi,
I'm trying to read in a C-header file with file(READ):
file(READ zconf.in.h ZCONF_H)
!! But this variable contains no ; whatsoever?
How can I ask to read it in completely?
Thanks,
Steven
___
Powered by www.kitware.com
Visit other Kitware