1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenRaider_CXX_FLAGS} -DUNIT_TEST")
- set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OpenRaider_CXX_FLAGS_DEBUG} -DUNIT_TEST")
- set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OpenRaider_CXX_FLAGS_RELEASE} -DUNIT_TEST")
-
- add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
-
- #################################################################
-
- add_executable (tester_binary EXCLUDE_FROM_ALL
- "binary.cpp" "../src/utils/binary.cpp"
- "../src/Exception.cpp" "../src/main.cpp"
- )
- add_dependencies (check tester_binary)
- add_test (NAME test_binary COMMAND tester_binary)
-
- #################################################################
-
- add_executable (tester_loader EXCLUDE_FROM_ALL
- "Loader.cpp" "../src/utils/binary.cpp"
- "../src/loader/Loader.cpp" "../src/loader/LoaderTR1.cpp"
- "../src/loader/LoaderTR2.cpp" "../src/loader/LoaderTR3.cpp"
- )
- #add_dependencies (check tester_loader)
- #add_test (NAME test_loader COMMAND tester_loader)
-
- #################################################################
-
- add_executable (tester_math EXCLUDE_FROM_ALL
- "math.cpp" "../src/math/math.cpp"
- "../src/math/Vec3.cpp"
- )
- add_dependencies (check tester_math)
- add_test (NAME test_math COMMAND tester_math)
-
- #################################################################
-
- add_executable (tester_script EXCLUDE_FROM_ALL
- "Script.cpp" "../src/Script.cpp" "../src/main.cpp"
- "../src/utils/binary.cpp" "../src/Exception.cpp"
- )
-
- find_package (ZLIB REQUIRED)
- include_directories (SYSTEM ${ZLIB_INCLUDE_DIRS})
- target_link_libraries (tester_script ${ZLIB_LIBRARIES})
-
- add_dependencies (check tester_script)
- add_test (NAME test_script COMMAND tester_script)
-
- #################################################################
|