Skip to content

Commit

Permalink
Merge pull request #306 from VirtualPlanetaryLaboratory/download-arti…
Browse files Browse the repository at this point in the history
…fact

Changed Makefile so opt forces the gnu17 standard
  • Loading branch information
RoryBarnes authored Sep 5, 2024
2 parents 2999109 + 8450e74 commit a184b50
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ debug_no_AE:
-gcc -g -o bin/vplanet src/*.c -lm -DGITVERSION=\"$(GITVERSION)\"

opt:
-gcc -o bin/vplanet src/*.c -lm -O3 -DGITVERSION=\"$(GITVERSION)\"
-gcc -o bin/vplanet src/*.c -lm -O3 -std=gnu17 -DGITVERSION=\"$(GITVERSION)\"
@echo ""
@echo "=========================================================================================================="
@echo 'To add vplanet to your $$PATH, please run the appropriate command for your shell type:'
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def run(self):
ext_modules=ext_modules,
cmdclass=cmdclass,
include_package_data=True,
data_files=[('', ['VERSION'])],
zip_safe=False,
entry_points={"console_scripts": ["vplanet=vplanet.wrapper:_entry_point"]},
)
Expand Down
21 changes: 18 additions & 3 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,12 @@ void AddOptionDouble(char *cFile, char *cOption, double *dInput, int *iLine,

GetLine(cFile, cOption, &cLine, iLine, iVerbose);
if (*iLine >= 0) {
sscanf(cLine, "%s %lf", cTmp, dInput);
int iNumOptionsRead = sscanf(cLine, "%s %lf", cTmp, dInput);
if (iNumOptionsRead != 2) {
printf("ERROR: %d arguments read for option %s.\n",iNumOptionsRead,cOption);
printf("\tcLine=%s, cTmp=%s, dInput=%lf\n", cLine, cTmp, *dInput );
exit(EXIT_INPUT);
}
}
free(cLine);
}
Expand All @@ -354,7 +359,12 @@ void AddOptionInt(char *cFile, char *cOption, int *iInput, int *iLine,

GetLine(cFile, cOption, &cLine, iLine, iVerbose);
if (*iLine >= 0) {
sscanf(cLine, "%s %d", cTmp, iInput);
int iNumOptionsRead = sscanf(cLine, "%s %d", cTmp, iInput);
if (iNumOptionsRead != 2) {
printf("ERROR: %d arguments read for option %s.\n",iNumOptionsRead,cOption);
printf("\tcLine=%s, cTmp=%s, dInput=%d\n", cLine, cTmp, *iInput );
exit(EXIT_INPUT);
}
}
free(cLine);
}
Expand Down Expand Up @@ -384,7 +394,12 @@ void AddOptionString(char *cFile, char *cOption, char cInput[], int *iLine,

GetLine(cFile, cOption, &cLine, iLine, iVerbose);
if (*iLine >= 0) {
sscanf(cLine, "%s %s", cTmp, cInput);
int iNumOptionsRead = sscanf(cLine, "%s %s", cTmp, cInput);
if (iNumOptionsRead != 2) {
printf("ERROR: %d arguments read for option %s.\n",iNumOptionsRead,cOption);
printf("\tcLine=%s, cTmp=%s, dInput=%s\n", cLine, cTmp, cInput );
exit(EXIT_INPUT);
}
}
free(cLine);
}
Expand Down

0 comments on commit a184b50

Please sign in to comment.