Include .cpp files when building.

This probably isn't an ideal way to add support for also compiling C++ in a project, but for now it works for my needs.
This commit is contained in:
Geenz 2015-03-31 03:17:33 -04:00
parent b234b7ed65
commit 6e52c31d59
1 changed files with 2 additions and 1 deletions

View File

@ -690,8 +690,9 @@ cli_register_cfile(char *fpath, struct dirent *dp)
struct stat st;
char *ext, *opath;
if ((ext = strrchr(fpath, '.')) == NULL || strcmp(ext, ".c"))
if ((ext = strrchr(fpath, '.')) == NULL || !(!strcmp(ext, ".c") || !strcmp(ext, ".cpp"))) {
return;
}
if (stat(fpath, &st) == -1)
cli_fatal("stat(%s): %s", fpath, errno_s);