summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2009-12-17 22:11:37 +0000
committerMorgan Deters <mdeters@gmail.com>2009-12-17 22:11:37 +0000
commit093492af43fae12d7f1d4607e63b1da686044ea6 (patch)
treed27effb35d74a299dc135b9ee85f3adc2b065061 /src/main
parentdfcf7dba0b2d8ad6eb9d8540e92804e70205b8fb (diff)
more build system fix-ups
Diffstat (limited to 'src/main')
-rw-r--r--src/main/Makefile.am4
-rw-r--r--src/main/Makefile.in5
-rw-r--r--src/main/main.cpp11
-rw-r--r--src/main/util.cpp4
4 files changed, 15 insertions, 9 deletions
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
index f5b76fcfb..7c4f2d52d 100644
--- a/src/main/Makefile.am
+++ b/src/main/Makefile.am
@@ -1,6 +1,6 @@
AM_CPPFLAGS = \
-I@srcdir@/../include -I@srcdir@/..
-AM_CXXFLAGS = -Wall -fvisibility=hidden
+AM_CXXFLAGS = -Wall
bin_PROGRAMS = cvc4
@@ -15,3 +15,5 @@ cvc4_SOURCES = \
cvc4_LDADD = \
../parser/libcvc4parser.la \
../libcvc4.la
+
+cvc4_LINK = $(CXXLINK)
diff --git a/src/main/Makefile.in b/src/main/Makefile.in
index 58eeeacdd..8e2c49989 100644
--- a/src/main/Makefile.in
+++ b/src/main/Makefile.in
@@ -222,7 +222,7 @@ top_srcdir = @top_srcdir@
AM_CPPFLAGS = \
-I@srcdir@/../include -I@srcdir@/..
-AM_CXXFLAGS = -Wall -fvisibility=hidden
+AM_CXXFLAGS = -Wall
cvc4_SOURCES = \
main.cpp \
getopt.cpp \
@@ -235,6 +235,7 @@ cvc4_LDADD = \
../parser/libcvc4parser.la \
../libcvc4.la
+cvc4_LINK = $(CXXLINK)
all: all-am
.SUFFIXES:
@@ -314,7 +315,7 @@ clean-binPROGRAMS:
rm -f $$list
cvc4$(EXEEXT): $(cvc4_OBJECTS) $(cvc4_DEPENDENCIES)
@rm -f cvc4$(EXEEXT)
- $(CXXLINK) $(cvc4_OBJECTS) $(cvc4_LDADD) $(LIBS)
+ $(cvc4_LINK) $(cvc4_OBJECTS) $(cvc4_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
diff --git a/src/main/main.cpp b/src/main/main.cpp
index ba71b043f..6f32e474b 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -28,6 +28,7 @@
#include "expr/expr_manager.h"
#include "smt/smt_engine.h"
#include "util/command.h"
+#include "util/Assert.h"
#include "util/output.h"
#include "util/options.h"
@@ -55,7 +56,7 @@ int main(int argc, char *argv[]) {
// We only accept one input file
if(argc > firstArgIndex + 1) {
- throw new Exception("Too many input files specified.");
+ throw Exception("Too many input files specified.");
}
// Create the expression manager
@@ -144,8 +145,10 @@ int main(int argc, char *argv[]) {
// Remove the parser
delete parser;
- // Delete handle to input file
- delete file;
+ if(! inputFromStdin) {
+ // Delete handle to input file
+ delete file;
+ }
} catch(OptionException& e) {
if(options.smtcomp_mode) {
cout << "unknown" << endl;
@@ -153,7 +156,7 @@ int main(int argc, char *argv[]) {
cerr << "CVC4 Error:" << endl << e << endl;
printf(usage, options.binary_name.c_str());
abort();
- } catch(CVC4::Exception& e) {
+ } catch(Exception& e) {
if(options.smtcomp_mode) {
cout << "unknown" << endl;
}
diff --git a/src/main/util.cpp b/src/main/util.cpp
index 9bb96d853..0b33b145d 100644
--- a/src/main/util.cpp
+++ b/src/main/util.cpp
@@ -46,14 +46,14 @@ void cvc4_init() throw() {
act1.sa_flags = SA_SIGINFO;
sigemptyset(&act1.sa_mask);
if(sigaction(SIGINT, &act1, NULL))
- throw new Exception(string("sigaction(SIGINT) failure: ") + strerror(errno));
+ throw Exception(string("sigaction(SIGINT) failure: ") + strerror(errno));
struct sigaction act2;
act2.sa_sigaction = segv_handler;
act2.sa_flags = SA_SIGINFO;
sigemptyset(&act2.sa_mask);
if(sigaction(SIGSEGV, &act2, NULL))
- throw new Exception(string("sigaction(SIGSEGV) failure: ") + strerror(errno));
+ throw Exception(string("sigaction(SIGSEGV) failure: ") + strerror(errno));
}
}/* CVC4::main namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback