change build to link in separate libs, also split test executable.
now building liblumiback.a liblumiproc.a liblumi.a build a separate test-common executable (for everything in src/common) include a precompiled header for assets.
This commit is contained in:
parent
c29b6bdd9a
commit
024e3c4dbc
39 changed files with 139 additions and 67 deletions
23
SConstruct
23
SConstruct
|
|
@ -234,18 +234,23 @@ def defineBuildTargets(env, artifacts):
|
|||
We use a custom function to declare a whole tree of srcfiles.
|
||||
"""
|
||||
|
||||
lumobj = ( srcSubtree(env,'$SRCDIR/backend')
|
||||
+ srcSubtree(env,'$SRCDIR/proc')
|
||||
+ srcSubtree(env,'$SRCDIR/common')
|
||||
+ srcSubtree(env,'$SRCDIR/lib')
|
||||
)
|
||||
objback = srcSubtree(env,'$SRCDIR/backend')
|
||||
objproc = srcSubtree(env,'$SRCDIR/proc')
|
||||
objlib = ( srcSubtree(env,'$SRCDIR/common')
|
||||
+ srcSubtree(env,'$SRCDIR/lib')
|
||||
)
|
||||
plugobj = srcSubtree(env,'$SRCDIR/plugin', isShared=True)
|
||||
core = env.StaticLibrary('$BINDIR/core.la', lumobj)
|
||||
#core = lumobj # use this for linking directly
|
||||
core = ( env.StaticLibrary('$BINDIR/lumiback.la', objback)
|
||||
+ env.StaticLibrary('$BINDIR/lumiproc.la', objproc)
|
||||
+ env.StaticLibrary('$BINDIR/lumi.la', objlib)
|
||||
)
|
||||
|
||||
# use PCH to speed up building
|
||||
precomp = env.PrecompiledHeader('$SRCDIR/pre')
|
||||
env.Depends(lumobj, precomp)
|
||||
precomp = ( env.PrecompiledHeader('$SRCDIR/pre')
|
||||
+ env.PrecompiledHeader('$SRCDIR/pre_a')
|
||||
)
|
||||
env.Depends(objproc, precomp)
|
||||
env.Depends(objlib, precomp)
|
||||
|
||||
artifacts['lumiera'] = env.Program('$BINDIR/lumiera', ['$SRCDIR/main.cpp']+ core )
|
||||
artifacts['plugins'] = env.SharedLibrary('$BINDIR/lumiera-plugin', plugobj)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
** building the object files including this header).
|
||||
**
|
||||
** @see mobject.hpp usage example
|
||||
** @see pre_a.hpp precompiled header including Asset subsystem
|
||||
*/
|
||||
|
||||
#ifndef LUMIERA_PRE_HPP
|
||||
|
|
|
|||
49
src/pre_a.hpp
Normal file
49
src/pre_a.hpp
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
PRE_A.hpp - precompiled header (including assets)
|
||||
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
/** @file pre.hpp
|
||||
** Precompiled Header including Asset subsystem.
|
||||
** Assortment of standard util, error handling and basic lib-boost components,
|
||||
** together with the basic asset.hpp.
|
||||
**
|
||||
** @see pre.hpp
|
||||
*/
|
||||
|
||||
#ifndef LUMIERA_PRE_A_HPP
|
||||
#define LUMIERA_PRE_A_HPP
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <tr1/memory>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include "lumiera.h"
|
||||
#include "proc/asset.hpp"
|
||||
|
||||
|
||||
#endif /*LUMIERA_PRE_A_HPP*/
|
||||
|
|
@ -55,8 +55,6 @@
|
|||
#define PROC_INTERFACE_ASSET_H
|
||||
|
||||
|
||||
#include "pre.hpp"
|
||||
|
||||
#include "proc/asset/category.hpp"
|
||||
#include "common/error.hpp"
|
||||
#include "common/p.hpp"
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
#define ASSET_DB_H
|
||||
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/error.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
#ifndef ASSET_MEDIA_H
|
||||
#define ASSET_MEDIA_H
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/factory.hpp"
|
||||
#include "proc/mobject/mobject.hpp"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#ifndef ASSET_META_H
|
||||
#define ASSET_META_H
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/factory.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@
|
|||
#ifndef ASSET_PROC_H
|
||||
#define ASSET_PROC_H
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/factory.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@
|
|||
#ifndef ASSET_STRUCT_H
|
||||
#define ASSET_STRUCT_H
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/query.hpp"
|
||||
#include "common/factory.hpp"
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@
|
|||
#define PROC_INTERFACE_ASSETMANAGER_H
|
||||
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
#include "common/error.hpp"
|
||||
#include "common/singleton.hpp"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Component Test Suite: common and basic components" ./test-components --group=common
|
||||
TESTING "Component Test Suite: common and basic components" ./test-common --group=common
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
TESTING "Proc Layer config rules Test Suite" ./test-components --group=query
|
||||
TESTING "Proc Layer config rules Test Suite" ./test-common --group=query
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "common/testtargetobj.hpp"
|
||||
#include "common/factory.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/util.hpp"
|
||||
|
||||
#include "testtargetobj.hpp"
|
||||
#include "common/factory.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <iostream>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "common/testtargetobj.hpp"
|
||||
#include "testtargetobj.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/factory.hpp"
|
||||
42
tests/common/mainsuite.cpp
Normal file
42
tests/common/mainsuite.cpp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
mainsuite.cpp - "the" Lumiera self test suite
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "common/test/suite.hpp"
|
||||
#include "common/test/testoption.hpp"
|
||||
|
||||
/** run all tests or any single test specified in the first
|
||||
* cmd line argument.
|
||||
* Note: to ease debugging, we don't catch any exceptions.
|
||||
*/
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
util::Cmdline args (argc,argv);
|
||||
test::TestOption optparser (args);
|
||||
test::Suite suite (optparser.getTestgroup());
|
||||
|
||||
if (optparser.getDescribe())
|
||||
suite.describe();
|
||||
else
|
||||
suite.run (args);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
#include "common/cmdline.hpp"
|
||||
#include "common/query.hpp"
|
||||
#include "common/query/querydiagnostics.hpp"
|
||||
#include "query/querydiagnostics.hpp"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <iostream>
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "common/testtargetobj.hpp"
|
||||
#include "common/singletonsubclass.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/util.hpp"
|
||||
|
||||
#include "testtargetobj.hpp"
|
||||
#include "common/singletonsubclass.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <iostream>
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "common/testtargetobj.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/singleton.hpp"
|
||||
#include "common/util.hpp"
|
||||
|
||||
#include "testtargetobj.hpp"
|
||||
#include "common/singleton.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/format.hpp>
|
||||
#include <iostream>
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
mainsuite.cpp - "the" Lumiera self test suite
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2008, Christian Thaeter <ct@pipapo.org>
|
||||
Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include "common/test/suite.hpp"
|
||||
#include "common/test/testoption.hpp"
|
||||
|
||||
/** run all tests or any single test specified in the first
|
||||
* cmd line argument.
|
||||
* Note: to ease debugging, we don't catch any exceptions.
|
||||
*/
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
util::Cmdline args (argc,argv);
|
||||
test::TestOption optparser (args);
|
||||
test::Suite suite (optparser.getTestgroup());
|
||||
|
||||
if (optparser.getDescribe())
|
||||
suite.describe();
|
||||
else
|
||||
suite.run (args);
|
||||
return 0;
|
||||
}
|
||||
1
tests/components/mainsuite.cpp
Symbolic link
1
tests/components/mainsuite.cpp
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../common/mainsuite.cpp
|
||||
|
|
@ -25,6 +25,8 @@
|
|||
#define ASSET_TESTASSET_H
|
||||
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "proc/asset.hpp"
|
||||
//#include "common/util.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/util.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
* *****************************************************/
|
||||
|
||||
|
||||
#include "pre_a.hpp"
|
||||
|
||||
#include "common/test/run.hpp"
|
||||
#include "common/util.hpp"
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "common/factory.hpp"
|
||||
#include "common/query.hpp"
|
||||
|
||||
#include "common/query/querydiagnostics.hpp"
|
||||
#include "../common/query/querydiagnostics.hpp"
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/format.hpp>
|
||||
|
|
|
|||
Loading…
Reference in a new issue