diff options
author | Martin Lucina <mato@kotelna.sk> | 2010-04-10 16:51:22 +0200 |
---|---|---|
committer | Martin Lucina <mato@kotelna.sk> | 2010-04-10 16:51:22 +0200 |
commit | f6fa41dd7b3677d0f7441db83cbd6c8a0283a499 (patch) | |
tree | 1bf42255947c804d757f563c7eb694f3dfe9477a | |
parent | c214a24f06bb41885dfbd73e42acb6e043df05ef (diff) |
Compile perf tests with the C++ compiler
This lets us build the binaries in a portable fashion w/o having to worry
about how to link with the C++ runtime.
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | perf/Makefile.am | 8 | ||||
-rw-r--r-- | perf/local_lat.cpp (renamed from perf/local_lat.c) | 2 | ||||
-rw-r--r-- | perf/local_thr.cpp (renamed from perf/local_thr.c) | 2 | ||||
-rw-r--r-- | perf/remote_lat.cpp (renamed from perf/remote_lat.c) | 2 | ||||
-rw-r--r-- | perf/remote_thr.cpp (renamed from perf/remote_thr.c) | 0 |
6 files changed, 7 insertions, 14 deletions
diff --git a/configure.in b/configure.in index e936cc7..ae944b4 100644 --- a/configure.in +++ b/configure.in @@ -55,13 +55,6 @@ fi # Checks for libraries. AC_CHECK_LIB([pthread], [pthread_create]) -# If using GNU C/C++ and static linking, libstdc++ must be available. -if test "x$gnu_compilers" = "xyes" -a "x$enable_shared" = "xno"; then - # libstdc++ depends on libm on some platforms - AC_CHECK_LIB([m], [main]) - AC_CHECK_LIB([stdc++], [main], , - [AC_MSG_ERROR([cannot link with -lstdc++])]) -fi # Extra CXXFLAGS are appended at the end of CXXFLAGS for libzmq. LIBZMQ_EXTRA_CXXFLAGS="" diff --git a/perf/Makefile.am b/perf/Makefile.am index d48dcee..fe35ff3 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -7,19 +7,19 @@ endif noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr $(PGM_EXAMPLES_BINS) local_lat_LDADD = $(top_builddir)/src/libzmq.la -local_lat_SOURCES = local_lat.c +local_lat_SOURCES = local_lat.cpp local_lat_CXXFLAGS = -Wall -pedantic -Werror remote_lat_LDADD = $(top_builddir)/src/libzmq.la -remote_lat_SOURCES = remote_lat.c +remote_lat_SOURCES = remote_lat.cpp remote_lat_CXXFLAGS = -Wall -pedantic -Werror local_thr_LDADD = $(top_builddir)/src/libzmq.la -local_thr_SOURCES = local_thr.c +local_thr_SOURCES = local_thr.cpp local_thr_CXXFLAGS = -Wall -pedantic -Werror remote_thr_LDADD = $(top_builddir)/src/libzmq.la -remote_thr_SOURCES = remote_thr.c +remote_thr_SOURCES = remote_thr.cpp remote_thr_CXXFLAGS = -Wall -pedantic -Werror if BUILD_PGM_EXAMPLES diff --git a/perf/local_lat.c b/perf/local_lat.cpp index 0114b23..9297137 100644 --- a/perf/local_lat.c +++ b/perf/local_lat.cpp @@ -25,7 +25,7 @@ int main (int argc, char *argv []) { const char *bind_to; int roundtrip_count; - int message_size; + size_t message_size; void *ctx; void *s; int rc; diff --git a/perf/local_thr.c b/perf/local_thr.cpp index 908bbe3..b612157 100644 --- a/perf/local_thr.c +++ b/perf/local_thr.cpp @@ -25,7 +25,7 @@ int main (int argc, char *argv []) { const char *bind_to; int message_count; - int message_size; + size_t message_size; void *ctx; void *s; int rc; diff --git a/perf/remote_lat.c b/perf/remote_lat.cpp index 6214ce8..df18b56 100644 --- a/perf/remote_lat.c +++ b/perf/remote_lat.cpp @@ -26,7 +26,7 @@ int main (int argc, char *argv []) { const char *connect_to; int roundtrip_count; - int message_size; + size_t message_size; void *ctx; void *s; int rc; diff --git a/perf/remote_thr.c b/perf/remote_thr.cpp index 1ddee4b..1ddee4b 100644 --- a/perf/remote_thr.c +++ b/perf/remote_thr.cpp |