summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-02-03 20:03:36 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2013-02-03 20:03:36 +0100
commit209c6412ae149cc7c503fd7da384f344a830423c (patch)
tree5baeaeb8dee2208b46bf80a118dfe59eb65f9389 /CMakeLists.txt
parent3f41f97fc47fca22634dc858c3ecdb39d0d27e32 (diff)
downloadcolobot-209c6412ae149cc7c503fd7da384f344a830423c.tar.gz
colobot-209c6412ae149cc7c503fd7da384f344a830423c.tar.bz2
colobot-209c6412ae149cc7c503fd7da384f344a830423c.zip
Refactoring in tests infrastructure
* all tests are now in /test/ subdirectory * unit tests concatenated to one executable (TODO: ui, common) * preparation for test environments (OpenGL and others) * removed old TestCBot
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa05134..ec457bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,7 @@ endif()
# Global compile flags
# These are specific to GCC/MinGW/clang; for other compilers, change as necessary
-# The flags are used throughout src/ subdir
+# The flags are used throughout src/ and test/ subdirs
set(COLOBOT_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wold-style-cast ${CXX11_FLAGS}")
set(COLOBOT_CXX_FLAGS_RELEASE "-O2")
set(COLOBOT_CXX_FLAGS_DEBUG "-g -O0")
@@ -151,7 +151,6 @@ endif()
if(${TESTS})
add_definitions(-DTEST_VIRTUAL=virtual)
- enable_testing()
else()
add_definitions(-DTEST_VIRTUAL=)
endif()
@@ -206,6 +205,11 @@ if(${TESTS})
add_subdirectory(${GMOCK_SRC_DIR} bin/gmock)
endif()
+
+ # Tests targets
+ enable_testing()
+ add_subdirectory(test bin/test)
+
endif()
# Installation paths defined before compiling sources
@@ -225,10 +229,10 @@ add_subdirectory(src bin)
# Data: check if the submodule handles its own installation
if(EXISTS "${CMAKE_SOURCE_DIR}/data/CMakeLists.txt")
- message(STATUS "Data directory will install itself.")
- add_subdirectory(data)
+ message(STATUS "Data directory will install itself.")
+ add_subdirectory(data)
else()
- message(WARNING "Data directory is not available; make sure colobot-data is installed in ${COLOBOT_INSTALL_DATA_DIR}.")
+ message(WARNING "Data directory is not available; make sure colobot-data is installed in ${COLOBOT_INSTALL_DATA_DIR}.")
endif()
# Documentation