Skip to content

Commit 965f53b

Browse files
committed
Add support for GUI bench tools in bench/gui using wxWidget framework.
1 parent f80a3a6 commit 965f53b

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

Diff for: Makefile.am

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
AUTOMAKE_OPTIONS = subdir-objects
22
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
3-
SUBDIRS = src test bench
3+
SUBDIRS = src test bench bench/gui
44
dist_noinst_SCRIPTS = autogen.sh

Diff for: bench/gui/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/gen/

Diff for: bench/gui/Makefile.am

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
AM_CXXFLAGS = --std=c++11 -pedantic -Wall $(WX_CXXFLAGS)
2+
LDADD = $(WX_LIBS)
3+
bin_PROGRAMS = smvd
4+
5+
# Sparse Matrix View Designer
6+
smvd_SOURCES = smvd.cpp gen/smvd_gui.cpp

Diff for: bench/gui/smvd.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <wx/wx.h>
2+
3+
class SmvdApp : public wxApp {
4+
public:
5+
virtual bool OnInit() override {
6+
// TODO:
7+
return true;
8+
}
9+
};
10+
11+
IMPLEMENT_APP(SmvdApp)

Diff for: configure.ac

+18-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,24 @@ AM_INIT_AUTOMAKE([1.10 foreign -Wall no-define])
66
AC_PROG_CXX
77
LT_INIT
88
AC_CONFIG_HEADERS([config.h])
9-
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile bench/Makefile])
9+
AC_CONFIG_FILES([Makefile src/Makefile test/Makefile bench/Makefile \
10+
bench/gui/Makefile])
11+
12+
# Check for wxWidgets version >= 3 (required for test/gui)
13+
AM_OPTIONS_WXCONFIG
14+
reqwx=3.0.0
15+
AM_PATH_WXCONFIG($reqwx, wxWin=1)
16+
if test "$wxWin" != 1; then
17+
AC_MSG_ERROR([
18+
wxWidgets must be installed on your system.
19+
20+
Please check that wx-config is in path, the directory where
21+
wxWidgets libraries are installed (returned by
22+
'wx-config --libs' or 'wx-config --static --libs'
23+
command) is in LD_LIBRARY_PATH or equivalent variable
24+
and wxWidgets version is $reqwx or above.
25+
])
26+
fi
1027

1128
AC_LANG(C++)
1229
AC_LINK_IFELSE(

0 commit comments

Comments
 (0)