From 6c21dceb35f7aaf90e54d3c030130e9465f343f3 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 11 Sep 2012 21:14:32 +0200 Subject: Tests rewrite and Doxygen in src/math - rewritten tests to use new framework - updated/reformatted Doxygen - removed legacy conversions --- src/math/test/CMakeLists.txt | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'src/math/test/CMakeLists.txt') diff --git a/src/math/test/CMakeLists.txt b/src/math/test/CMakeLists.txt index c736022..87121a0 100644 --- a/src/math/test/CMakeLists.txt +++ b/src/math/test/CMakeLists.txt @@ -1,33 +1,23 @@ cmake_minimum_required(VERSION 2.8) set(CMAKE_BUILD_TYPE debug) -set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -O0") +set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -Wold-style-cast -std=gnu++0x") -add_executable(matrix_test matrix_test.cpp) -add_executable(vector_test vector_test.cpp) -add_executable(geometry_test geometry_test.cpp ../old/math3d.cpp ../old/d3dmath.cpp ../../graphics/d3d/d3dutil.cpp) - -enable_testing() - -add_test(matrix_test ./matrix_test) -add_test(vector_test ./vector_test) -add_test(geometry_test ./geometry_test) - -# Change to DirectX SDK directory -include_directories("c:/dxsdk/include") +include_directories( +. +../../.. +${GTEST_DIR}/include +) -add_definitions(-DSTRICT -DD3D_OVERLOADS) +add_executable(matrix_test matrix_test.cpp) +target_link_libraries(matrix_test gtest) -# 'make check' will compile the required test programs -# Note that 'make test' will still fail without compiled programs -add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS matrix_test vector_test) +add_executable(vector_test vector_test.cpp) +target_link_libraries(vector_test gtest) -# Files to be removed in distclean -set(REMOVE_FILES - CMakeFiles Testing cmake_install.cmake CMakeCache.txt CTestTestfile.cmake Makefile - ./matrix_test - ./vector_test - ./geometry_test -) +add_executable(geometry_test geometry_test.cpp) +target_link_libraries(geometry_test gtest) -add_custom_target(distclean COMMAND rm -rf ${REMOVE_FILES}) +add_test(matrix_test matrix_test) +add_test(vector_test vector_test) +add_test(geometry_test geometry_test) -- cgit v1.2.3-1-g7c22