- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using VS 2019 with IFX (the same issue shows up with IFORT). I have added some Fortran files to the solution, and for some reason, these files are recompiled every time I run even when I have made no changes to any file in the solution.
Looking around, I found websites like this (https://michaelscodingspot.com/visual-studio-keeps-rebuilding-projects-no-good-reason/) that suggest "In your solution, go to Tools -> Options. Choose Projects and Solutions -> Build and Run and select Diagnostic in “MSbuild project build ouput verbosity”." That then adds information to the build output that can be used to debug. However, this seems to be a C/C++ only option, because it has no effect on the build output from the Fortran project in my solution.
Is there a way to make IFX/VS tell me why it's choosing to recompile a given file? Or at least give me more information on what it's doing?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The recompile issue as you have described is symptomatic of:
a) improperly listed build dependencies
b) circular (module) references
c) dependency on a file that is not created by the build
d) (related to c) incorrect/missing settings in the Configuration Manager: missing Build check and/or solution configuration and/or Platform
If all else fails to resolve the issue, then recreate the Solution and Projects.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a) Is there any way to see/edit how Visual Studio is determining build dependencies?
b) I double-checked and the module file that keeps getting recompiled and its corresponding submodule aren't dependent upon anything.
c) I don't think this is it, given my answer to b). But I may be misunderstanding you.
d) Could you elaborate on this one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As far as I know, there is no user-visible insight into the dependency checking process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you do a clean and a full build does it always fail to build the first time? That is a sure sign of circular dependency. The thing that fails is part of the circle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No that's the odd thing. A clean build always passes, and then a subsequent build will still want to recompile those files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No to a)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have had this type of problem in the past (some years back) and found:
1) In one instance remaking the VS project using the source files fixed the problem but I did not work out how or why.
2) I one had a problem that persisted for several months which I spend a lot of effort on but could find no reason why. I did extensive checking for circular dependencies and found none. I "fixed" it eventually by splitting a specific source file into two parts. There was no reason evident why that worked, I assumed it was some bug in dependency checking that had its "trigger" removed.
Sorry I can't offer any ideas. Reading your initial post, does it recompile everything or just a specific set of files? Do you use include files? How many files does the project have? Is everything in modules or sub-modules or do you have a mix with "external" routines? Just asking questions to maybe get some ideas.
Also is this relevant?
https://community.intel.com/t5/Intel-Fortran-Compiler/Issue-with-Dependency-Checker/td-p/1523866

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page