unittest++.lua 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --
  2. -- Copyright 2010-2013 Branimir Karadzic. All rights reserved.
  3. -- License: http://www.opensource.org/licenses/BSD-2-Clause
  4. --
  5. function flagsremove(name)
  6. -- bx's toolchain.lua disables exceptions everywhere
  7. -- this function can remove some of those flags when
  8. -- needed.
  9. local container, err = premake.getobject("solution")
  10. for _, block in pairs(container["blocks"]) do
  11. local tbl = block["flags"]
  12. for index, value in pairs(tbl) do
  13. if value == name then
  14. table.remove(tbl, index)
  15. print(index, value, type(value))
  16. end
  17. end
  18. end
  19. end
  20. project "UnitTest++"
  21. uuid "ab932f5c-2409-11e3-b000-887628d43830"
  22. kind "StaticLib"
  23. flagsremove("NoExceptions")
  24. files {
  25. "../3rdparty/UnitTest++/src/*.cpp",
  26. "../3rdparty/UnitTest++/src/*.h",
  27. }
  28. configuration { "linux or osx" }
  29. files {
  30. "../3rdparty/UnitTest++/src/Posix/**.cpp",
  31. "../3rdparty/UnitTest++/src/Posix/**.h",
  32. }
  33. configuration { "windows" }
  34. files {
  35. "../3rdparty/UnitTest++/src/Win32/**.cpp",
  36. "../3rdparty/UnitTest++/src/Win32/**.h",
  37. }
  38. configuration {}