Commit 55cf3a80 authored by wiebel's avatar wiebel
Browse files

make testing stuff optional

parent ee7ff42a
......@@ -5,15 +5,12 @@ PROJECT( BrainCognize )
FIND_PACKAGE( Qt4 REQUIRED )
FIND_PACKAGE( OpenGL REQUIRED )
FIND_PACKAGE( Boost REQUIRED )
FIND_PACKAGE( CxxTest )
FIND_PACKAGE( CxxTest QUIET )
# Package settings:
SET( CXXTEST_USE_PYTHON 1 )
# Includes:
INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${OPENGL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${CXXTEST_INCLUDE_DIR} )
# Libraries for linking:
SET( QT_LINK_LIBRARIES ${QT_QTCORE_LIBRARY}
......@@ -25,8 +22,14 @@ MARK_AS_ADVANCED( LIBRARY_OUTPUT_PATH )
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )
MARK_AS_ADVANCED( EXECUTABLE_OUTPUT_PATH )
# Activate CTest and "test" target
ENABLE_TESTING()
IF( CXXTEST_FOUND )
INCLUDE_DIRECTORIES( ${CXXTEST_INCLUDE_DIR} )
# Package settings:
SET( CXXTEST_USE_PYTHON 1 )
# Activate CTest and "test" target
ENABLE_TESTING()
ENDIF( CXXTEST_FOUND )
# Global compiler flags:
#-----------------------
......
......@@ -5,5 +5,6 @@ FILE(GLOB GUI_SRC "*.cpp")
ADD_LIBRARY( gui SHARED ${GUI_SRC} )
# Unit tests
CXXTEST_ADD_TEST( unittest_BGUI BGUI_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/test/BGUI_test.h )
IF( CXXTEST_FOUND )
CXXTEST_ADD_TEST( unittest_BGUI BGUI_test.cc ${CMAKE_CURRENT_SOURCE_DIR}/test/BGUI_test.h )
ENDIF( CXXTEST_FOUND )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment