Skip to content

Commit a393e66

Browse files
committed
Fix compile errors in omicOUT, update Makefile and .gitignore
This commit is copied from commit 706764e in Pull Request #3. That PR does more than fixing issue #2, so I decided to split the other parts off into separate commits. - Add omicOUT to the Makefile.am - Fix compiler error about the ifstream pointer check. - Add some omitOUT related files to the Git ignore list. Thanks for Albert Vernon Smith <[email protected]> for the fix!
1 parent 9a8e370 commit a393e66

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,8 @@
7474
/lib/
7575
/doc/*.aux
7676
/doc/auto/
77+
/OmicOUT/.deps/
78+
/OmicOUT/.deps/
79+
/OmicOUT/.dirstamp
80+
/OmicOUT/omicout-main.o
81+
/omicout

OmicOUT/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,21 +235,21 @@ int main(int argc, char *argv[] )
235235

236236
ifstream fp_allResults;
237237
fp_allResults.open((source + ".dbin").c_str(),ios::in | ios::binary );
238-
if(fp_allResults == 0)
238+
if(!fp_allResults.is_open())
239239
{
240240
cout << "Error reading File "<< (source + ".dbin") << endl;
241241
exit(1);
242242
}
243243
ifstream fp_InfoResults;
244244
fp_InfoResults.open((source + ".ibin").c_str(),ios::in | ios::binary );
245-
if(fp_InfoResults == 0)
245+
if(!fp_InfoResults)
246246
{
247247
cout << "Error Creating File " << (source + ".ibin") << endl;
248248
exit(1);
249249
}
250250
ofstream fp_sigResults;
251251
fp_sigResults.open((dest + ".txt").c_str(),ios::out | ios::trunc);
252-
if(fp_sigResults == 0)
252+
if(!fp_sigResults)
253253
{
254254
cout << "Error Creating File "<< (dest + ".txt") << endl;
255255
exit(1);

src/Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This is not a recursive makefile. This file is to be included
22
# in the top Makefile.am
33

4-
bin_PROGRAMS = omicabelnomm
4+
bin_PROGRAMS = omicabelnomm omicout
55

66
oanomm_cpp = src/AIOwrapper.cpp src/Algorithm.cpp src/Utility.cpp
77
oanomm_headers = $(oanomm_cpp:.cpp=.h) src/Definitions.h
@@ -11,3 +11,6 @@ omicabelnomm_CPPFLAGS = $(AM_CPPFLAGS)
1111
if USE_MPI
1212
omicabelnomm_CPPFLAGS += -DUSE_MPI
1313
endif
14+
15+
omicout_SOURCES = OmicOUT/main.cpp
16+
omicout_CPPFLAGS = $(AM_CPPFLAGS)

0 commit comments

Comments
 (0)