Skip to content

Instantly share code, notes, and snippets.

@PeterHajdu
Created August 1, 2012 17:43
Show Gist options
  • Save PeterHajdu/3229141 to your computer and use it in GitHub Desktop.
Save PeterHajdu/3229141 to your computer and use it in GitHub Desktop.
base config for the coding dojo

base build system for a coding dojo

#include "some.hpp"
int some()
{
return 1;
}
#ifndef _SOME_HPP_
#define _SOME_HPP_
int some();
#endif
#include <cxxtest/TestSuite.h>
#include "some.hpp"
class SomeTest : public CxxTest::TestSuite
{
public:
void testSome()
{
TS_ASSERT_EQUALS( 1, some() );
}
};
include_rules
: test_*.hpp |> !generate_test |> testFile.cpp
: foreach *.cpp |> !cpp |>
: *.o |> !link_test |>
: |> !run_test |>
CFLAGS+=-Wall -pedantic --coverage -ggdb
CXX=g++
!generate_test = |> cxxtestgen --error-printer -o %o %f |>
!cpp = |> $(CXX) $(CFLAGS) $(COMP_ATTR) %f -c |> %B.o %B.gcno
!link_test = |> $(CXX) $(CFLAGS) $(COMP_ATTR) %f -o %o |> testFile
!run_test = | testFile *.gcno |> valgrind --leak-check=full --show-reachable=yes ./testFile |>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment