[CMake] Configuration

Alexander Neundorf a.neundorf-work at gmx.net
Thu Jul 26 11:01:09 EDT 2007


On Thursday 26 July 2007 10:43, you wrote:
> Hi Alex,
>
> > > In my configure.h.cmake: #cmakedefine SYSTEM_NAME In my
> > > CMakeLists.txt: CHECK(system SYSTEM_NAME)
> > > 			    CONFIGURE_FILE(configure.h.cmake
> >
> > configure.h)
> >
> > > Is something like this possible?
> >
> > Did you have a look at ${CMAKE_SYSTEM_NAME} ?
>
> Yes I had, but when I write in the configure.h.cmake "#cmakedefine
> ${CMAKE_SYSTEM_NAME}" then the result after the configure_file is this: /*
> #undef Windows  */.

You have to do:
#cmakedefine CMAKE_SYSTEM_NAME

But I think you want this:
#define THE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}"

Bye
Alex


More information about the CMake mailing list