Skip to content

Instantly share code, notes, and snippets.

@jmingtan
Created October 22, 2010 17:52
Show Gist options
  • Save jmingtan/641026 to your computer and use it in GitHub Desktop.
Save jmingtan/641026 to your computer and use it in GitHub Desktop.
premake4 script for UnitTest++
solution "UnitTest++"
platforms { "x32" }
configurations { "Release" }
build_dir = "build"
targetdir(build_dir)
objdir(build_dir)
location(build_dir)
configuration { "macosx" }
buildoptions { "-fvisibility=hidden" }
configuration { "windows" }
files { "src/Win32/*.cpp" }
configuration { "not windows" }
files { "src/Posix/*.cpp" }
project "UnitTest"
language "C++"
kind "StaticLib"
files { "src/*.h", "src/*.cpp" }
project "UnitTestTest"
language "C++"
kind "ConsoleApp"
links { "UnitTest" }
libdirs { build_dir .. "/**" }
files { "src/**.h", "src/tests/*.cpp" }
configuration { "Release*" }
defines { "NDEBUG" }
flags { "Optimize" }
if _ACTION == "clean" then
os.rmdir(build_dir)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment