Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Mon, Sep 19, 2011 at 17:26, Michael Jackson
 wrote:
>
> Aren't the Generated VS10 Solutions _still_ dependent on CMake or has that 
> changed?

Not that I can see on CMake 2.8.5, so far I suppressed generating the
ZERO_CHECK target which automatically re-runs CMake if it detects
relevant changes.

The resulting sln and vcxproj files seems only dependent on VS 10.

-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Mon, Sep 19, 2011 at 17:04, John Drescher  wrote:
> To me this sounds like something that would be perfect to do with
> CMake options and some usage of find_libraray, maybe some environment
> variables to help out. However I do not mean to tell you how to
> configure your software..

I agree. We already generate the header file on 'configure' systems.
And of course if we migrate totally to CMake for all platforms we can
even get rid of configure alltogether.

It's just we're not quite ready yet to tell our Visual Studio
developers they need to run CMake to get the project files, which have
been so far over the years handed to them ready to build :)


-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Michael Jackson


On Sep 19, 2011, at 11:58 AM, Perry Ismangil wrote:

> On Mon, Sep 19, 2011 at 12:47, Eric Noulard  wrote:
>> 
>> The fact is it works the way you want, which is good, but beside that
>> why would it be better for the user to face a failing build (because
>> he forgot to create the file)
>> than
>> face a failing CMake run (because he forgot to create the file)?
> 
> This is because for now, we are going to supply pre-made VS solution
> files instead of geting developers running CMake on their Windows
> machine. That is, we'll run CMake to generate VS 10 files and ship
> that.
> 
> So we're using CMake just as a VS10 generator at release time.
> 
> Probably later on we'll decide if we just ship CMakeLists and get the
> developers to run CMake generators themselves. If they do, then yes we
> can generate this header on the fly like the configure/Makefile-based
> system we use now on the Unix platforms.
> 
> Thanks for the suggestions, much appreciated.
> 
> Regards,
> 
> -- 
> Perry Ismangil

Aren't the Generated VS10 Solutions _still_ dependent on CMake or has that 
changed? 
___
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net 
BlueQuartz Software   Dayton, Ohio

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread John Drescher
> On Mon, Sep 19, 2011 at 14:13, John Drescher  wrote:
>> My question is can't you have CMake generate the header for the user
>> instead of them supplying a file? Is it just defines in this header?
>>
>
> It's basically user/site-specific defines that is based on user
> preferences and availability of libraries/devices on their Windows
> platform. At the moment for Windows Visual Studio users we force them
> to do this manually.
>

To me this sounds like something that would be perfect to do with
CMake options and some usage of find_libraray, maybe some environment
variables to help out. However I do not mean to tell you how to
configure your software..

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Mon, Sep 19, 2011 at 14:13, John Drescher  wrote:
> My question is can't you have CMake generate the header for the user
> instead of them supplying a file? Is it just defines in this header?
>

It's basically user/site-specific defines that is based on user
preferences and availability of libraries/devices on their Windows
platform. At the moment for Windows Visual Studio users we force them
to do this manually.

Thanks.

-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Mon, Sep 19, 2011 at 12:47, Eric Noulard  wrote:
>
> The fact is it works the way you want, which is good, but beside that
> why would it be better for the user to face a failing build (because
> he forgot to create the file)
> than
> face a failing CMake run (because he forgot to create the file)?

This is because for now, we are going to supply pre-made VS solution
files instead of geting developers running CMake on their Windows
machine. That is, we'll run CMake to generate VS 10 files and ship
that.

So we're using CMake just as a VS10 generator at release time.

Probably later on we'll decide if we just ship CMakeLists and get the
developers to run CMake generators themselves. If they do, then yes we
can generate this header on the fly like the configure/Makefile-based
system we use now on the Unix platforms.

Thanks for the suggestions, much appreciated.

Regards,

-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread John Drescher
>>> Do you want the user to manually add the header, or do you want cmake
>>> to create it?
>>>
>>
>> User will manually add it before compile, so Eric mentioned setting
>> the GENERATED property to true, it works.
>
> The fact is it works the way you want, which is good, but beside that
> why would it be better for the user to face a failing build (because
> he forgot to create the file)
> than
> face a failing CMake run (because he forgot to create the file)?
>

My question is can't you have CMake generate the header for the user
instead of them supplying a file? Is it just defines in this header?

John
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Eric Noulard
2011/9/19 Perry Ismangil :
> On Sun, Sep 18, 2011 at 16:47, C. Meissa  wrote:
>>
>> Do you want the user to manually add the header, or do you want cmake
>> to create it?
>>
>
> User will manually add it before compile, so Eric mentioned setting
> the GENERATED property to true, it works.

The fact is it works the way you want, which is good, but beside that
why would it be better for the user to face a failing build (because
he forgot to create the file)
than
face a failing CMake run (because he forgot to create the file)?



-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Sun, Sep 18, 2011 at 16:47, C. Meissa  wrote:
>
> Do you want the user to manually add the header, or do you want cmake
> to create it?
>

User will manually add it before compile, so Eric mentioned setting
the GENERATED property to true, it works.

Thanks!

-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-19 Thread Perry Ismangil
On Sun, Sep 18, 2011 at 16:43, Eric Noulard  wrote:
>
> You may tell CMake that this file is generated as part of the build:
> set_source_files_properties(your_header.h PROPERTIES GENERATED TRUE)
>

Thanks Eric, this is indeed the property I was looking for to get the
right behaviour.

-- 
Perry Ismangil
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-18 Thread C. Meissa
On So, 18.09.2011 16:37:31, Perry Ismangil wrote:
> On of our project, one of the header file included in the project is
> deliberately missing, the user have to manually create it before
> building for the first time.

Do you want the user to manually add the header, or do you want cmake
to create it?
 
> When I tried this with cmake,

See above: What have you been trying to do?

Best Regards
C.M.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] User generated header file

2011-09-18 Thread Eric Noulard
2011/9/18 Perry Ismangil :
> I'm converting Visual Studio project files to CMake.
>
> On of our project, one of the header file included in the project is
> deliberately missing, the user have to manually create it before
> building for the first time.
>
> When I tried this with cmake, it complained that it couldn't find the
> header file specified, which is of course true.
>
> How do I suppress this behaviour?

You may tell CMake that this file is generated as part of the build:
set_source_files_properties(your_header.h PROPERTIES GENERATED TRUE)

This should enable you to run CMake without the file
but the build should fail if it is not there at build time.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake