summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:55 +0100
committerBardur Arantsson <bardur@scientician.net>2015-02-23 09:11:55 +0100
commit062cd07342edc2b003555e90dd2cee0514b9f64a (patch)
tree3c73893dae8a9380c9f24e9c5822c5ec6bf671d5 /src
parentffee481435ac0afe3f9a5a3eb07b2f2a46467089 (diff)
Add BanditCpp 1.1.4 test harness
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore1
-rw-r--r--src/CMakeLists.txt20
2 files changed, 16 insertions, 5 deletions
diff --git a/src/.gitignore b/src/.gitignore
index b33b0ccc..0799f693 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,2 +1,3 @@
+/harness
/tome
w_*.c
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df64bbf2..a834095b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,12 +1,12 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../vendor/bandit)
# Add subdirectories
ADD_SUBDIRECTORY (squelch)
-# Sources
-SET(SRCS
- main-gcu.c main-x11.c main-sdl.c main-gtk2.c
+# Sources (common)
+SET(SRCS_COMMON
z-rand.c z-util.c z-form.c z-term.c
variable.cc tables.cc hooks.cc util.cc cave.cc dungeon.cc
melee1.cc melee2.cc messages.cc modules.cc
@@ -27,12 +27,18 @@ SET(SRCS
help.cc hiscore.cc range.cc dice.cc
generate.cc gen_maze.cc gen_evol.cc wild.cc levels.cc store.cc bldg.cc
cmovie.cc
- wizard1.cc wizard2.cc init1.cc init2.cc birth.cc main.c
+ wizard1.cc wizard2.cc init1.cc init2.cc birth.cc
quark.cc
# Lua bits:
lua_bind.cc script.cc
)
+# Sources (PROGRAM)
+SET(SRCS_PROGRAM main-gcu.c main-x11.c main-sdl.c main-gtk2.c main.c)
+
+# Sources (TEST)
+FILE(GLOB SRCS_TESTS ../tests/**.cc)
+
# Need a few additional source files for Windows.
if(WIN32)
SET(SRCS ${SRCS} main-win.c)
@@ -51,9 +57,13 @@ if(WIN32)
endif(WIN32)
# tome executable
-ADD_EXECUTABLE(tome ${EXECUTABLE_OPTIONS} ${SRCS})
+ADD_EXECUTABLE(tome ${EXECUTABLE_OPTIONS} ${SRCS_COMMON} ${SRCS_PROGRAM})
TARGET_LINK_LIBRARIES(tome squelch ${LIBS})
+# test harness executable
+ADD_EXECUTABLE(harness ${EXECUTABLE_OPTIONS} ${SRCS_COMMON} ${SRCS_TESTS})
+TARGET_LINK_LIBRARIES(harness squelch ${LIBS})
+
# Installation
INSTALL(TARGETS tome
RUNTIME DESTINATION bin