Skip to content

Commit

Permalink
Merge pull request #23 from climbfuji/gmtb-ccpp-gnu-support
Browse files Browse the repository at this point in the history
Gmtb ccpp gnu support - requires NCAR/ccpp-physics#36 followed by NCAR/gmtb-fv3#25 for full support of gcc/clang compilers.
  • Loading branch information
climbfuji authored Jan 12, 2018
2 parents 543b7a9 + c2f5669 commit 09af324
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ccpp_dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,16 @@ ccpp_dl_open(const char *scheme, const char *lib, const char *ver,
library = malloc(n);
memset(library, 0, n);
if (strcmp(ver, "") != 0) {
#ifdef __APPLE__
snprintf(library, n, "%s%s.%s%s", prefix, lib,
ver, suffix);
#elif defined(__linux__) || defined(__unix__)
snprintf(library, n, "%s%s%s.%s", prefix, lib,
suffix, ver);
#else
warnx("CCPP library name not configured for this operating system");
return(EXIT_FAILURE);
#endif
} else {
snprintf(library, n, "%s%s%s", prefix, lib, suffix);
}
Expand Down

0 comments on commit 09af324

Please sign in to comment.