fix: give a generated makefile the flags that were asked for - #346
Merged
Conversation
The fortran flags, c flags and linker flags a user asked for were dropped from a generated makefile. The fortran and linker flag builders were called with an empty list, and the c flag builder was called with the fortran flags, so a fortran flag was written to CFLAGS and a c flag was written nowhere. The syslibs _create_makefile takes were never passed to _write_makedefaults at all. Each builder is now given the flags that belong to it, and syslibs is passed down.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #346 +/- ##
=============================================
+ Coverage 77.821% 80.972% +3.150%
=============================================
Files 20 20
Lines 3269 3269
=============================================
+ Hits 2544 2647 +103
+ Misses 725 622 -103
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fortran flags, c flags and linker flags a user asked for were all dropped from a generated makefile:
_get_fortran_flagsand_get_linker_flagswere called with an empty list, so--fflagsand--syslibsnever reachedFFLAGSorLDFLAGS._get_c_flagswas called with the fortran flags, so a fortran flag was written toCFLAGSand a c flag was written nowhere.syslibswas a documented parameter of_create_makefilethat the body never used, so it could not reach_write_makedefaults.Each builder is now given the flags that belong to it, and
syslibsis passed down. A makefile generated without any flags is byte identical to before.