From 074862ea6c1a4c7049d005d10c95c9b49bfa50fe Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 19 Feb 2014 21:51:55 -0700 Subject: [PATCH] Adding basic test project files Added the main source file for running tests in. Added premake4.lua so you can create a project for "any" platform/target of your choice. Added gitignore to only add those basic files, ignore everything else. --- tests/.gitignore | 8 ++++++++ tests/main.cpp | 6 ++++++ tests/premake4.lua | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 tests/.gitignore create mode 100644 tests/premake4.lua diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..84d5d3b --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,8 @@ +# Since we're using premake4, only include test source file and the premake4.lua, +# everything else can go. + +*.* + +!.gitignore +!main.cpp +!premake4.lua \ No newline at end of file diff --git a/tests/main.cpp b/tests/main.cpp index e69de29..3e04938 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -0,0 +1,6 @@ +#include "math/Vector3.h" + +int main() +{ + return 0; +} \ No newline at end of file diff --git a/tests/premake4.lua b/tests/premake4.lua new file mode 100644 index 0000000..4d72b03 --- /dev/null +++ b/tests/premake4.lua @@ -0,0 +1,50 @@ +-- http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Premake +-- http://industriousone.com/command-line-arguments +-- http://blog.assarbad.net/20120929/premake4-snippet-to-create-solution-names-depending-on-target-visual-studio-version/ + +solution "tests" + + location "." + configurations { "Debug", "Release" } + platforms { "native", "x32", "x64", "universal" } + flags { "ExtraWarnings" } + + configuration "Debug" + defines { "DEBUG", "TRACE" } + flags { "Symbols" } + + configuration "Release" + defines { "NDEBUG", "TRACE" } + flags { "Optimize" } + + + -- Project kinds + -- ConsoleApp + -- Makefile + -- SharedLib + -- StaticLib + -- WindowedApp + + project "tests" + kind "ConsoleApp" + language "C++" + targetdir "bin" + files { "../src/**.cpp", "main.cpp" } + + includedirs { + "../include", + } + + configuration "Debug" + defines { "DEBUG", "USE_CHEATS", "TRACE" } + flags { "Symbols" } + targetsuffix "_d" + + configuration "Release" + defines { "NDEBUG", "USE_CHEATS", "TRACE" } + flags { "Optimize" } + + configuration { "x64", "debug" } + targetsuffix "x64_d" + configuration { "x64", "release" } + targetsuffix "x64" \ No newline at end of file