merge additional tweaks after landing config system

This commit is contained in:
Fischlurch 2008-09-08 05:14:20 +02:00
commit efabba2cac
4 changed files with 52 additions and 16 deletions

View file

@ -79,7 +79,7 @@ def setupBasicEnvironment():
env.Append(CPPDEFINES = '_GNU_SOURCE')
appendCppDefine(env,'DEBUG','DEBUG', 'NDEBUG')
appendCppDefine(env,'OPENGL','USE_OPENGL')
# appendCppDefine(env,'OPENGL','USE_OPENGL')
appendVal(env,'ARCHFLAGS', 'CCFLAGS') # for both C and C++
appendVal(env,'OPTIMIZE', 'CCFLAGS', val=' -O3')
appendVal(env,'DEBUG', 'CCFLAGS', val=' -ggdb')
@ -128,7 +128,7 @@ def defineCmdlineOptions():
allowed_values=('ALPHA', 'BETA', 'RELEASE'))
,BoolOption('DEBUG', 'Build with debugging information and no optimizations', False)
,BoolOption('OPTIMIZE', 'Build with strong optimization (-O3)', False)
,BoolOption('OPENGL', 'Include support for OpenGL preview rendering', False)
# ,BoolOption('OPENGL', 'Include support for OpenGL preview rendering', False)
# ,EnumOption('DIST_TARGET', 'Build target architecture', 'auto',
# allowed_values=('auto', 'i386', 'i686', 'x86_64' ), ignorecase=2)
,PathOption('DESTDIR', 'Installation dir prefix', '/usr/local')
@ -183,8 +183,10 @@ def configurePlatform(env):
if not conf.CheckLibWithHeader('dl', 'dlfcn.h', 'C'):
problems.append('Functions for runtime dynamic loading not available.')
if not conf.CheckLibWithHeader('nobugmt', 'nobug.h', 'C'):
if not conf.CheckPkgConfig('nobugmt', 0.3):
problems.append('Did not find NoBug [http://www.pipapo.org/pipawiki/NoBug].')
else:
conf.env.mergeConf('nobugmt')
if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'C'):
problems.append('Did not find the pthread lib or pthread.h.')
@ -337,8 +339,8 @@ def definePostBuildTargets(env, artifacts):
env.Clean ('build', [ '$SRCDIR/pre.gch' ])
doxydoc = artifacts['doxydoc'] = env.Doxygen('doc/devel/Doxyfile')
env.Alias ('doxydoc', doxydoc)
env.Clean ('doxydoc', doxydoc + ['doc/devel/,doxylog','doc/devel/warnings.txt'])
env.Alias ('doc', doxydoc)
env.Clean ('doc', doxydoc + ['doc/devel/,doxylog','doc/devel/warnings.txt'])
def defineInstallTargets(env, artifacts):

View file

@ -1,4 +1,4 @@
# Doxyfile 1.5.5
# Doxyfile 1.5.6
#---------------------------------------------------------------------------
# Project related configuration options
@ -10,7 +10,7 @@ OUTPUT_DIRECTORY =
CREATE_SUBDIRS = YES
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = NO
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = "The $name class" \
"The $name widget" \
"The $name file" \
@ -22,7 +22,7 @@ ABBREVIATE_BRIEF = "The $name class" \
a \
an \
the
ALWAYS_DETAILED_SEC = NO
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = ../../src/ \
@ -44,6 +44,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = YES
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = YES
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
@ -66,7 +67,7 @@ HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
SORT_BRIEF_DOCS = YES
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES
@ -77,6 +78,8 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@ -185,12 +188,14 @@ HTML_DYNAMIC_SECTIONS = NO
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
@ -268,6 +273,8 @@ CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES

View file

@ -5,6 +5,7 @@
from os import path
from Buildhelper import srcSubtree
from Buildhelper import scanSubtree
from Buildhelper import globRootdirs
Import('env','artifacts','core')
@ -31,6 +32,15 @@ def testExecutable(env,tree, exeName=None, obj=None):
return env.Program('#$BINDIR/'+exeName, obj + core)
def testCollection(env,dir):
""" treat a Directory containing a collection of standalone tests.
Link each of them into an independent executable
"""
exeName = lambda p: path.basename(path.splitext(p)[0])
buildIt = lambda p: env.Program("#$BINDIR/"+exeName(p), [p] + core)
return [buildIt(f) for f in scanSubtree(dir)]
def treatPluginTestcase(env):
""" Special case: the test-plugin executable
"""
@ -56,15 +66,14 @@ def treatPluginTestcase(env):
moduledirs = globRootdirs('*')
# but have to treat some subdirs individually.
specials = ['plugin','locking','library','backend']
specials = ['plugin','library','backend']
artifacts['testsuite'] = ts = ( [ testExecutable(env, dir) for dir in moduledirs if not dir in specials]
# + treatPluginTestcase(env)
# + testExecutable(env, 'locking', obj=['test-locking.c','mutex.c','condition.c'])
# + testExecutable(env, 'library', exeName='test-llist', obj=['test-llist.c'])
# + testExecutable(env, 'library', exeName='test-references', obj=['test-references.c'])
# + testCollection(env, 'library')
# + testCollection(env, 'backend')
)

View file

@ -26,6 +26,9 @@
#include "lib/error.h"
#include <stdio.h>
NOBUG_DEFINE_FLAG (tests);
LUMIERA_ERROR_DEFINE (TEST, "test error");
#define TESTS_BEGIN \
@ -33,20 +36,35 @@ int \
main (int argc, char** argv) \
{ \
NOBUG_INIT; \
NOBUG_INIT_FLAG (tests); \
\
if (argc == 1) \
return 1;
{ \
fprintf (stderr, "missing argument\n"); \
return 1; \
}
#define TEST(name) \
#define TEST(name) \
else if (!strcmp(argv[1], name))
#define TESTS_END \
else \
return 1; \
{ \
fprintf (stderr, "unknown test\n"); \
return 1; \
} \
\
return 0; \
}
#endif
/*
// Local Variables:
// mode: C
// c-file-style: "gnu"
// indent-tabs-mode: nil
// End:
*/