[CMake] CMAKE_SYSTEM not available

Dieter Oberkofler doberkofler.lists at gmail.com
Tue Sep 29 13:51:41 EDT 2009


Nothing wrong with calling project at the very beginning but in my case it
was quite at the end of the CMakeLists.txt file and this made it fail. I was
not aware of this "restriction" until now and did also not find any remarks
in the documentation.

> -----Original Message-----
> From: Tyler Roscoe [mailto:tyler at cryptio.net]
> Sent: Tuesday, September 29, 2009 19:45
> To: Dieter Oberkofler
> Cc: cmake at cmake.org
> Subject: Re: [CMake] CMAKE_SYSTEM not available
> 
> On Tue, Sep 29, 2009 at 07:42:09PM +0200, Dieter Oberkofler wrote:
> > The installation looks ok but I guess I just found out what is wrong.
> > CMAKE_SYSTEM is only available after having used the PROJECT command.
> > Is this really a needed and required dependency?
> 
> Is there some reason you want to avoid calling project()?
> 
> project() sets up a bunch of stuff. I guess you could try to call all
> the relevant CMake modules yourself, but just putting a project(tmp) at
> the top of your CMakeLists seems like a pretty good solution to me.
> 
> tyler



More information about the CMake mailing list