Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

CMakeLists.txt 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  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. # Add GLM Library
  6. find_package (GLM REQUIRED)
  7. if (GLM_FOUND)
  8. include_directories (SYSTEM ${GLM_INCLUDE_DIRS})
  9. endif (GLM_FOUND)
  10. #################################################################
  11. add_executable (tester_binary EXCLUDE_FROM_ALL
  12. "binary.cpp" "../src/utils/binary.cpp"
  13. )
  14. add_dependencies (check tester_binary)
  15. add_test (NAME test_binary COMMAND tester_binary)
  16. #################################################################
  17. add_executable (tester_script EXCLUDE_FROM_ALL
  18. "Script.cpp" "ScriptPayload.h" "ScriptTest.h"
  19. "../src/Script.cpp" "../src/utils/binary.cpp"
  20. )
  21. find_package (ZLIB REQUIRED)
  22. include_directories (SYSTEM ${ZLIB_INCLUDE_DIRS})
  23. target_link_libraries (tester_script ${ZLIB_LIBRARIES})
  24. add_dependencies (check tester_script)
  25. add_test (NAME test_script COMMAND tester_script)
  26. #################################################################