tests.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. -- Premake build scripts for ODE unit tests
  2. package.name = "tests"
  3. package.kind = "exe"
  4. package.language = "c++"
  5. package.path = "custom"
  6. package.objdir = "obj/tests"
  7. package.includepaths =
  8. {
  9. "../../include",
  10. "../../tests/UnitTest++/src"
  11. }
  12. package.defines =
  13. {
  14. "_CRT_SECURE_NO_DEPRECATE"
  15. }
  16. package.files =
  17. {
  18. matchfiles("../../tests/*.cpp"),
  19. matchfiles("../../tests/joints/*.cpp"),
  20. matchfiles("../../tests/UnitTest++/src/*")
  21. }
  22. if (windows) then
  23. table.insert(package.files, matchfiles("../../tests/UnitTest++/src/Win32/*"))
  24. else
  25. table.insert(package.files, matchfiles("../../tests/UnitTest++/src/Posix/*"))
  26. end
  27. package.links =
  28. {
  29. "ode"
  30. }
  31. -- Output is placed in a directory named for the target toolset.
  32. package.path = options["target"]
  33. if (not options["enable-static-only"]) then
  34. table.insert(package.config["DebugDoubleDLL"].defines, "dDOUBLE")
  35. table.insert(package.config["ReleaseDoubleDLL"].defines, "dDOUBLE")
  36. end
  37. if (not options["enable-shared-only"]) then
  38. table.insert(package.config["DebugDoubleLib"].defines, "dDOUBLE")
  39. table.insert(package.config["ReleaseDoubleLib"].defines, "dDOUBLE")
  40. end