Re: [CMake] What is the VS10 .rule file generated for each ADD_CUSTOM_COMMAND?

2011-06-27 Thread Bill Hoffman

On 6/27/2011 11:57 AM, Gabriel Petrovay wrote:

Hi Bill,

I have no exception. I only know that Cmake generates a wrong Include
attribute for a  element (first in a series of cmake
generated filed). This generated file also does not have a .rule file
generated for it like for all the others in the loop.

If you could provide a small example that shows this issue, it would be 
very helpful in fixing this for you.

Where exactly is 2.8.5?


See Dave Cole's email to the cmake mailing list about 2.8.5 RC 3.

http://www.cmake.org/cmake/resources/software.html

I will also give it a try with 2.8.5 once I have it.


In the meanwhile can you also please give me some details about the rule
files? Thanks!
1. What is the rule file?
2. What is the logic by which this file is generated?



The custom commands in VS require that they are "hung" on a file.  It is 
not sufficient to list inputs and outputs and create a rule.  With VS 7, 
8, and 9, the .rule file did not need to exist.  VS 2010 does not run 
rules that hang off of non-existent files. So, we have to actually 
create the files...


-Bill
___
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] What is the VS10 .rule file generated for each ADD_CUSTOM_COMMAND?

2011-06-27 Thread Bill Hoffman

On 6/25/2011 11:40 AM, Gabriel Petrovay wrote:

(Using Cmake 2.8.4)



I think this was something I just fixed.   There were some cases where 
the rule files were not be created.  If you could post a small example I 
could take a look and see if it is fixed now.


Also, please try the most current RC for 2.8.5.

-Bill


On Sat, Jun 25, 2011 at 5:39 PM, Gabriel Petrovay
mailto:gabipetro...@gmail.com>> wrote:

Hi,

1. What is the rule file?
2. What is the logic by which this file is generated?

I have a list of src files that need to be generated, each by an
ADD_CUSTOM_COMMAND

in a FOREACH loop:

FOREACH(SRC ${SRC_LIST})

// no code here

ADD_CUSTOM_COMMAND(...)

// no code here

ENDFOREACH(SRC)


And all  BUT the first generated SRC files get a SRC.rule file in
the same build directory? Why this?

Moreover, if I look in the vcxproj file generated I see that the
 is slightly different for the first SRC in the list.

The first  elements (for the 1st item in SRC_LIST) has
as "Include" attribute the relative path (from the current build
dir) to the MAIN_DEPENDENCY.
The rest  elements (for the rest items in SRC_LIST)
have as "Include" attribute the relative path (from the current
build dir) to the SRC.rule file.

Why is this?



--
MSc Gabriel Petrovay
Mobile: +41(0)787978034 
www.28msec.com 




--
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com 



___
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



--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoff...@kitware.com
http://www.kitware.com
518 881-4905 (Direct)
518 371-3971 x105
Fax (518) 371-4573
___
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] What is the VS10 .rule file generated for each ADD_CUSTOM_COMMAND?

2011-06-25 Thread Gabriel Petrovay
(Using Cmake 2.8.4)

On Sat, Jun 25, 2011 at 5:39 PM, Gabriel Petrovay wrote:

> Hi,
>
> 1. What is the rule file?
> 2. What is the logic by which this file is generated?
>
> I have a list of src files that need to be generated, each by an
> ADD_CUSTOM_COMMAND
>
> in a FOREACH loop:
>
> FOREACH(SRC ${SRC_LIST})
>
> // no code here
>
> ADD_CUSTOM_COMMAND(...)
>
> // no code here
>
> ENDFOREACH(SRC)
>
>
> And all  BUT the first generated SRC files get a SRC.rule file in the same
> build directory? Why this?
>
> Moreover, if I look in the vcxproj file generated I see that the
>  is slightly different for the first SRC in the list.
>
> The first  elements (for the 1st item in SRC_LIST) has as
> "Include" attribute the relative path (from the current build dir) to
> the MAIN_DEPENDENCY.
> The rest  elements (for the rest items in SRC_LIST) have as
> "Include" attribute the relative path (from the current build dir) to
> the SRC.rule file.
>
> Why is this?
>
>
>
> --
> MSc Gabriel Petrovay
> Mobile: +41(0)787978034
> www.28msec.com
>



-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com
___
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

[CMake] What is the VS10 .rule file generated for each ADD_CUSTOM_COMMAND?

2011-06-25 Thread Gabriel Petrovay
Hi,

1. What is the rule file?
2. What is the logic by which this file is generated?

I have a list of src files that need to be generated, each by an
ADD_CUSTOM_COMMAND

in a FOREACH loop:

FOREACH(SRC ${SRC_LIST})

// no code here

ADD_CUSTOM_COMMAND(...)

// no code here

ENDFOREACH(SRC)


And all  BUT the first generated SRC files get a SRC.rule file in the same
build directory? Why this?

Moreover, if I look in the vcxproj file generated I see that the
 is slightly different for the first SRC in the list.

The first  elements (for the 1st item in SRC_LIST) has as
"Include" attribute the relative path (from the current build dir) to
the MAIN_DEPENDENCY.
The rest  elements (for the rest items in SRC_LIST) have as
"Include" attribute the relative path (from the current build dir) to
the SRC.rule file.

Why is this?



-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com
___
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