aboutsummaryrefslogtreecommitdiff
path: root/common/template
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-07-17 15:16:34 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-07-17 15:16:34 +0200
commit5aa48fc52202fd95210d8860b66769550732a5d9 (patch)
treec0319bd35076c41a83a8b8a3c67bb8a3db3a182d /common/template
parent9f2b5f3c24907d603706ff81b459d3f5d3c0882e (diff)
Add support for tests with multiple ODB headers
Diffstat (limited to 'common/template')
-rw-r--r--common/template/Makefile.am23
-rw-r--r--common/template/template-vc10.vcxproj29
-rw-r--r--common/template/template-vc10.vcxproj.filters20
-rw-r--r--common/template/template-vc9.vcproj21
4 files changed, 55 insertions, 38 deletions
diff --git a/common/template/Makefile.am b/common/template/Makefile.am
index 4478502..0aa8f83 100644
--- a/common/template/Makefile.am
+++ b/common/template/Makefile.am
@@ -13,15 +13,9 @@ AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)'
TESTS=$(top_builddir)/tester
TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir;
-m4_ifelse(__value__(odb_options),,,
-
+__ifelse__(__value__(odb_options),,,
# ODB compilation.
#
-driver_SOURCES += test.hxx
-nodist_driver_SOURCES = test-odb.cxx
-BUILT_SOURCES = test-odb.hxx
-CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx
-
ODB = @ODB@
ODBFLAGS = @ODBFLAGS@
ODBCPPFLAGS = @ODBCPPFLAGS@
@@ -30,6 +24,17 @@ if HAVE_CXX11
ODBFLAGS += --std c++11
endif
-test-odb.hxx: test.hxx
+nodist_driver_SOURCES =
+BUILT_SOURCES =
+CLEANFILES =
+
+__foreach_w__(__f,__path__(odb_header_stem),
+driver_SOURCES += __f.hxx
+nodist_driver_SOURCES += __f-odb.cxx
+BUILT_SOURCES += __f-odb.hxx
+CLEANFILES += __f-odb.hxx __f-odb.ixx __f-odb.cxx
+
+__f-odb.hxx: __f.hxx
$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
-)
+
+))
diff --git a/common/template/template-vc10.vcxproj b/common/template/template-vc10.vcxproj
index 5666584..c1229ea 100644
--- a/common/template/template-vc10.vcxproj
+++ b/common/template/template-vc10.vcxproj
@@ -154,25 +154,30 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
-m4_ifelse(__value__(odb_options),,,
+__ifelse__(__value__(odb_options),,,
m4_dnl
<ItemGroup>
-__custom_build_entry__(
-test.hxx,
-odb test.hxx,
-odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
+ __foreach_w__(__f,__path__(odb_header_stem),
+ __custom_build_entry__(
+__f.hxx,
+odb __f.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) __f.hxx,
+__f-odb.hxx;__f-odb.ixx;__f-odb.cxx)
+)
</ItemGroup>)
<ItemGroup>
-m4_ifelse(__value__(odb_options),,,
-__header_entry__(test-odb.hxx)
-__header_entry__(test-odb.ixx))
-__header_entries__(extra_headers)
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+__header_entry__(__f-odb.hxx)
+__header_entry__(__f-odb.ixx)
+))__header_entries__(extra_headers)
</ItemGroup>
<ItemGroup>
__source_entry__(driver.cxx)
-m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
-__source_entries__(extra_sources)
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+__source_entry__(__f-odb.cxx)
+))__source_entries__(extra_sources)
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/common/template/template-vc10.vcxproj.filters b/common/template/template-vc10.vcxproj.filters
index f3ee658..3460ffd 100644
--- a/common/template/template-vc10.vcxproj.filters
+++ b/common/template/template-vc10.vcxproj.filters
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
@@ -11,14 +11,18 @@
</Filter>
</ItemGroup>
<ItemGroup>
-__header_filter_entry__(test.hxx)
-__header_filter_entry__(test-odb.hxx)
-__header_filter_entry__(test-odb.ixx)
-__header_filter_entries__(extra_headers)
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+__header_filter_entry__(__f.hxx)
+__header_filter_entry__(__f-odb.hxx)
+__header_filter_entry__(__f-odb.ixx)
+))__header_filter_entries__(extra_headers)
</ItemGroup>
<ItemGroup>
__source_filter_entry__(driver.cxx)
-__source_filter_entry__(test-odb.cxx)
-__source_filter_entries__(extra_sources)
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+__source_filter_entry__(__f-odb.cxx)
+))__source_filter_entries__(extra_sources)
</ItemGroup>
-</Project> \ No newline at end of file
+</Project>
diff --git a/common/template/template-vc9.vcproj b/common/template/template-vc9.vcproj
index caf7201..a09174c 100644
--- a/common/template/template-vc9.vcproj
+++ b/common/template/template-vc9.vcproj
@@ -337,7 +337,9 @@
UniqueIdentifier="{__uuid__()}"
>
__source_entry__(driver.cxx)
-m4_ifelse(__value__(odb_options),,,__source_entry__(test-odb.cxx))
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+ __source_entry__(__f-odb.cxx)))
__source_entries__(extra_sources)
</Filter>
<Filter
@@ -345,14 +347,15 @@ __source_entries__(extra_sources)
Filter="h;hxx;ixx;txx"
UniqueIdentifier="{__uuid__()}"
>
-m4_ifelse(__value__(odb_options),,,
-__file_entry_custom_build__(
-test.hxx,
-odb test.hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test.hxx,
-test-odb.hxx;test-odb.ixx;test-odb.cxx)
-__file_entry__(test-odb.hxx)
-__file_entry__(test-odb.ixx))
+__ifelse__(__value__(odb_options),,,
+ __foreach_w__(__f,__path__(odb_header_stem),
+ __file_entry_custom_build__(
+__f.hxx,
+odb __f.hxx,
+odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) __f.hxx,
+__f-odb.hxx;__f-odb.ixx;__f-odb.cxx)
+__file_entry__(__f-odb.hxx)
+__file_entry__(__f-odb.ixx)))
__file_entries__(extra_headers)
</Filter>
</Files>