How to add a response file to the project dependences?

  • Thread starter Alexander Zauzolkov
  • Start date
A

Alexander Zauzolkov

Hi!

I have a VC++.Net project. Project specific defines and include paths
are saved in an external file (response file). I use the file during
compilation giving it by means of the @ compiler option that is
provided through project properties: C/C++ -> Command Line ->
Additional Options.

Now is the problem. After project build if I change the response file,
the compiler does not note this and does not perform a new build. (In
case of a make file this would be simply :(( )

Is it possible to include this file in the dependencies chain so that
the compiler makes a complete build?
Perhaps there are other ideas how to get desired behaviour?


Thanks
 
T

Tarek Madkour [MSFT]

(e-mail address removed) (Alexander Zauzolkov) wrote in
I have a VC++.Net project. Project specific defines and include
paths are saved in an external file (response file). I use the
file during compilation giving it by means of the @ compiler
option that is provided through project properties: C/C++ ->
Command Line -> Additional Options.

I'm guessing you're doing this to share command-line across multiple
projects?
Now is the problem. After project build if I change the response
file, the compiler does not note this and does not perform a new
build. (In case of a make file this would be simply :(( )

Is it possible to include this file in the dependencies chain so
that the compiler makes a complete build?

VC++ build system does not expose a way to specify custom file
dependencies for .cpp files.
Perhaps there are other ideas how to get desired behaviour?

If I'm right about why you're using .rsp files, we expose a way in
VS2005 to share properties across multiple projects. This would
eliminate the need for you creating your own .rsp files.

Thanks,
 
A

Alexander Zauzolkov

Hello!

Thanks for your response.

Tarek Madkour said:
I'm guessing you're doing this to share command-line across multiple
projects?

You are right. I share these options even across different compilers.
To do this I have a configuration table of a special format, which
will be processed by means a perl script to generate compiler specific
options.
VC++ build system does not expose a way to specify custom file
dependencies for .cpp files.
I have found one way. The script generates additionally a header file,
which will be added to the project (compiler) properties through /FI
option.
That means, once the configuration is changed (it should be added to
the project) the script runs and generates a new header file that will
take part in the dependencies check.


Regards,
Alexander Zauzolkov
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top