Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenRaider_CXX_FLAGS} -DUNIT_TEST")
  2. set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OpenRaider_CXX_FLAGS_DEBUG} -DUNIT_TEST")
  3. set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${OpenRaider_CXX_FLAGS_RELEASE} -DUNIT_TEST")
  4. add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure)
  5. #################################################################
  6. add_executable (tester_binary EXCLUDE_FROM_ALL
  7. "binary.cpp" "../src/utils/binary.cpp"
  8. "../src/Exception.cpp" "../src/main.cpp"
  9. )
  10. add_dependencies (check tester_binary)
  11. add_test (NAME test_binary COMMAND tester_binary)
  12. #################################################################
  13. add_executable (tester_loader EXCLUDE_FROM_ALL
  14. "Loader.cpp" "../src/utils/binary.cpp"
  15. "../src/loader/Loader.cpp" "../src/loader/LoaderTR1.cpp"
  16. "../src/loader/LoaderTR2.cpp" "../src/loader/LoaderTR3.cpp"
  17. )
  18. #add_dependencies (check tester_loader)
  19. #add_test (NAME test_loader COMMAND tester_loader)
  20. #################################################################
  21. add_executable (tester_math EXCLUDE_FROM_ALL
  22. "math.cpp" "../src/math/math.cpp"
  23. "../src/math/Vec3.cpp"
  24. )
  25. add_dependencies (check tester_math)
  26. add_test (NAME test_math COMMAND tester_math)
  27. #################################################################
  28. add_executable (tester_script EXCLUDE_FROM_ALL
  29. "Script.cpp" "../src/Script.cpp" "../src/main.cpp"
  30. "../src/utils/binary.cpp" "../src/Exception.cpp"
  31. )
  32. find_package (ZLIB REQUIRED)
  33. include_directories (SYSTEM ${ZLIB_INCLUDE_DIRS})
  34. target_link_libraries (tester_script ${ZLIB_LIBRARIES})
  35. add_dependencies (check tester_script)
  36. add_test (NAME test_script COMMAND tester_script)
  37. #################################################################