Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for changing build dependencies #267

Closed
bjonkman opened this issue Apr 1, 2019 · 4 comments
Closed

Suggestion for changing build dependencies #267

bjonkman opened this issue Apr 1, 2019 · 4 comments

Comments

@bjonkman
Copy link
Contributor

bjonkman commented Apr 1, 2019

Is your feature request related to a problem? Please describe.
Every time the git hash changes, the NWTC Library is (or at least should be) rebuilt. Since almost all code depends on this library, this results in a lot of unnecessary rebuilding/linking.

Describe the solution you'd like
I suggest moving the the QueryGitVersion subroutine in the NWTC Library to a separate stand-alone module that only the glue codes and drivers depend on.

@ebranlard
Copy link
Contributor

Yes! That's the way forward in my opinion. I've been discussing this with @rafmudaf and I believe he is working on a solution.

@ebranlard
Copy link
Contributor

I believe VersionInfo.f90 is not recompiled in Visual studio if the git version changes. I don't know how to force a dependency between this file and the git header file.
An alternative, is to force a timestamp change of VersionInfo.f90. https://stackoverflow.com/a/35498399/627911

@bjonkman do you confirm this is indeed an issue?

@bjonkman
Copy link
Contributor Author

bjonkman commented Apr 7, 2020

@ebranlard I've played around with a few things in the OpenFAST Visual Studio files, but it looks like Visual Studio does not notice that changing the header file should rebuild the VersionInfo.f90 file. When I generate the dependency list for that file, it does show there is a dependency on the header file (though not on the file specified in the intermediate directory), so I think that would be something to ask Intel.

You can change the timestamp using a pre-Build step like that example you've linked to. HOWEVER, it still won't build that file on that particular build step because it seems to look at the timestamp before pressing build. It will build it the next time you build. If you delete the versioninfo.obj and versioninfo.mod files instead of changing the VersionInfo.f90 time stamp, it would force you to build the second time. I'd probably change the timestamp or delete the intermediate files on the post-build step instead. Then you would force it to recompile VersionInfo.f90 every time without having to hit build twice.

@bjonkman
Copy link
Contributor Author

Note: After #428, the VersionInfo module is now used in NWTC_IO.f90, which reverts the dependency changes discussed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants