Open Source Tomb Raider Engine
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

CMakeLists.txt 1.1KB

12345678910111213141516171819202122232425262728293031
  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_script EXCLUDE_FROM_ALL
  14. "Script.cpp" "../src/Script.cpp" "../src/main.cpp"
  15. "../src/utils/binary.cpp" "../src/Exception.cpp"
  16. )
  17. find_package (ZLIB REQUIRED)
  18. include_directories (SYSTEM ${ZLIB_INCLUDE_DIRS})
  19. target_link_libraries (tester_script ${ZLIB_LIBRARIES})
  20. add_dependencies (check tester_script)
  21. add_test (NAME test_script COMMAND tester_script)
  22. #################################################################