Global compiler properties

Global compiler properties

Brian Francis's picture

Hi all,

I am looking for a method of standardizing compiler/linker settings across 50 solutions, 280 C/C++ projects and 110 Fortran projects. I'm using Studio 2010 and Fortran XE 2011. I use win32.props and win64.props in a root directory to apply C/C++ settings globally, but I have to resort to writing sed and bash scripts to globally apply Fortran settings (or kill brain cells editing by hand).

How do other developers handle global Fortran compiler settings?

I'm also still looking for a way to compare all projects in a solution for consistency, as well as determine if any file in a project has settings different from the others.

Brian.

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

The .vfproj files are XML files. With normal XML tools, you could look at the <Configurations> section and compare those.

Steve
Tim Prince's picture
Best Reply

Some of your shared settings might be appropriate for ifort.cfg.

Brian Francis's picture

Thanks Tim, I'd forgotten about ifort.cfg.

Along a similar vein, has anyone had success with using response files with DevStudio? Reading the on-line help, it would seem that I could create response files for varying needs. A vfproj could then refer to the appropriate response file in somewhat the same way that vcproj/vcxproj refer to props files.

Brian.

Steve Lionel (Intel)'s picture

I don't think you can get DevStudio to use a response file.

Steve
Brian Francis's picture

Hi Steve,

I've been able to get a response file to work. I selected "Properties>Configuration>Fortran>Command Line" on a Fortran project and entered the following into the "Additional options" field:

    @$(root)/win32.vfprops

In a top-level directory pointed to by the "root" environment variable, I created a win32.vfprops file and added two lines:

    /extend_source:72
    /Disatest

Compiling confirmed that the "isatest" preprocesor symbol was defined. The /extend_source:72 was not taken because there was already an earlier /extend_source:132 option on the command line. It appears that the first occurance of an option is the one that is used by the compiler. This "problem" will go away once I remove Fortran project compiler options from the project and add them to the response file.

Brian.

Steve Lionel (Intel)'s picture

Ah, yes, I had not considered that method. Of course....

Steve

Login to leave a comment.