diff options
Diffstat (limited to 'test/unit/CMakeLists.txt')
-rw-r--r-- | test/unit/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 575f5c0..34027b8 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -15,10 +15,20 @@ endif() # Configure file configure_file(${SRC_DIR}/common/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/common/config.h) +# Platform-dependent implementation of system.h +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(SYSTEM_CPP_MODULE "system_windows.cpp") +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(SYSTEM_CPP_MODULE "system_linux.cpp") +else() + set(SYSTEM_CPP_MODULE "system_other.cpp") +endif() + # Code sources set(COLOBOT_SOURCES ${SRC_DIR}/app/app.cpp ${SRC_DIR}/app/system.cpp +${SRC_DIR}/app/${SYSTEM_CPP_MODULE} ${SRC_DIR}/common/event.cpp ${SRC_DIR}/common/image.cpp ${SRC_DIR}/common/iman.cpp @@ -159,12 +169,24 @@ if (${OPENAL_SOUND}) endif() endif() + +# Platform-dependent tests +if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + #TODO: set(PLATFORM_TESTS app/system_windows_test.cpp) +elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + set(PLATFORM_TESTS app/system_linux_test.cpp) +else() + #TODO: set(PLATFORM_TESTS app/system_other_test.cpp) +endif() + +# Tests set(UT_SOURCES main.cpp graphics/engine/lightman_test.cpp math/geometry_test.cpp math/matrix_test.cpp math/vector_test.cpp +${PLATFORM_TESTS} ) include_directories( |