diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-08 21:23:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-08 21:23:37 +0200 |
commit | ff5bb2accee87c24ee64e8fdcf5169e674c4b7b4 (patch) | |
tree | 321a74c1f48331cb44e3b90943501646c5024836 /common | |
parent | b3b1fac433a20e5ab6abb3729ecc5473a658718b (diff) |
Add suppor for VC++ build
Diffstat (limited to 'common')
-rw-r--r-- | common/Makefile.am | 2 | ||||
-rw-r--r-- | common/auto/driver.cxx | 2 | ||||
-rw-r--r-- | common/auto/makefile | 21 | ||||
-rw-r--r-- | common/common-vc10.sln | 15 | ||||
-rw-r--r-- | common/common-vc9.sln | 15 | ||||
-rw-r--r-- | common/lifecycle/driver.cxx | 2 | ||||
-rw-r--r-- | common/lifecycle/makefile | 21 | ||||
-rw-r--r-- | common/makefile | 11 | ||||
-rw-r--r-- | common/query/driver.cxx | 2 | ||||
-rw-r--r-- | common/query/makefile | 23 | ||||
-rw-r--r-- | common/schema/driver.cxx | 2 | ||||
-rw-r--r-- | common/schema/makefile | 21 | ||||
-rw-r--r-- | common/template/Makefile.am | 6 | ||||
-rw-r--r-- | common/template/driver.cxx | 2 | ||||
-rw-r--r-- | common/template/makefile | 21 | ||||
-rw-r--r-- | common/template/template-vc10.vcxproj | 173 | ||||
-rw-r--r-- | common/template/template-vc10.vcxproj.filters | 24 | ||||
-rw-r--r-- | common/template/template-vc9.vcproj | 356 | ||||
-rw-r--r-- | common/test.bat | 48 | ||||
-rw-r--r-- | common/threads/driver.cxx | 2 | ||||
-rw-r--r-- | common/threads/makefile | 21 |
21 files changed, 750 insertions, 40 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index a526e4c..00c4ef0 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -8,3 +8,5 @@ SUBDIRS = __path__(dirs) if ODB_TESTS_THREADS SUBDIRS += __path__(thread_dirs) endif + +EXTRA_DIST = __file__(extra_dist) diff --git a/common/auto/driver.cxx b/common/auto/driver.cxx index 423254e..4a65725 100644 --- a/common/auto/driver.cxx +++ b/common/auto/driver.cxx @@ -13,7 +13,7 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/auto/makefile b/common/auto/makefile index b39759a..e4cdffd 100644 --- a/common/auto/makefile +++ b/common/auto/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -47,11 +47,20 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake,$(src_root)/common/template/Makefile.am) + $(call dist-data,$(sources) $(headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -82,6 +91,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) diff --git a/common/common-vc10.sln b/common/common-vc10.sln new file mode 100644 index 0000000..9a5dc32 --- /dev/null +++ b/common/common-vc10.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/common/common-vc9.sln b/common/common-vc9.sln new file mode 100644 index 0000000..2ec9432 --- /dev/null +++ b/common/common-vc9.sln @@ -0,0 +1,15 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +__projects__ +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +__solution_configurations__ + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +__project_configurations__ + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/common/lifecycle/driver.cxx b/common/lifecycle/driver.cxx index ef5a4aa..a7be6d4 100644 --- a/common/lifecycle/driver.cxx +++ b/common/lifecycle/driver.cxx @@ -13,7 +13,7 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/lifecycle/makefile b/common/lifecycle/makefile index 73cc2e4..b2a6875 100644 --- a/common/lifecycle/makefile +++ b/common/lifecycle/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -47,11 +47,20 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake,$(src_root)/common/template/Makefile.am) + $(call dist-data,$(sources) $(headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -82,6 +91,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) diff --git a/common/makefile b/common/makefile index ef085e9..f575f74 100644 --- a/common/makefile +++ b/common/makefile @@ -24,15 +24,24 @@ clean := $(out_base)/.clean $(default): $(addprefix $(out_base)/,$(addsuffix /,$(build_tests))) +name := $(notdir $(src_base)) +$(dist): name := $(name) $(dist): export dirs := $(tests) $(dist): export thread_dirs := $(thread_tests) +$(dist): export extra_dist := $(call vc9slns,$(name)) $(call vc10slns,$(name)) $(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(all_tests))) $(call meta-automake) + $(call meta-vc9slns,$(name)) + $(call meta-vc10slns,$(name)) + $(call meta-vctest,$(name)-mysql-vc10.sln,test.bat) $(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(build_tests))) $(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(all_tests))) -$(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9sln.make) +$(call include,$(bld_root)/meta/vc10sln.make) +$(call include,$(bld_root)/meta/vctest.make) +$(call include,$(bld_root)/meta/automake.make) ifneq ($(filter $(MAKECMDGOALS),dist clean),) $(foreach t,$(all_tests),$(call import,$(src_base)/$t/makefile)) diff --git a/common/query/driver.cxx b/common/query/driver.cxx index 2573d7e..eede6d8 100644 --- a/common/query/driver.cxx +++ b/common/query/driver.cxx @@ -13,7 +13,7 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/query/makefile b/common/query/makefile index 27e19e8..08eb33d 100644 --- a/common/query/makefile +++ b/common/query/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -48,12 +48,21 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) traits.hxx test.std -$(dist): export extra_headers := traits.hxx +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): export extra_headers := traits.hxx +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake,$(src_root)/common/template/Makefile.am) + $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -84,6 +93,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) diff --git a/common/schema/driver.cxx b/common/schema/driver.cxx index 2647d8c..e189b23 100644 --- a/common/schema/driver.cxx +++ b/common/schema/driver.cxx @@ -13,7 +13,7 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/schema/makefile b/common/schema/makefile index de22c01..5c71905 100644 --- a/common/schema/makefile +++ b/common/schema/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -47,11 +47,20 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake,$(src_root)/common/template/Makefile.am) + $(call dist-data,$(sources) $(headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -82,6 +91,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) diff --git a/common/template/Makefile.am b/common/template/Makefile.am index b2fc122..ca3a3d5 100644 --- a/common/template/Makefile.am +++ b/common/template/Makefile.am @@ -3,13 +3,15 @@ # copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC # license : GNU GPL v2; see accompanying LICENSE file +EXTRA_DIST = __file__(extra_dist) + noinst_PROGRAMS = driver driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) -driver_LDADD = $(top_builddir)/libcommon/libcommon.la +driver_LDADD = $(top_builddir)/libcommon/common/libcommon.la driver_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' TESTS=$(top_builddir)/tester -TESTS_ENVIRONMENT=top_builddir=$(top_builddir); +TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; # ODB compilation. # diff --git a/common/template/driver.cxx b/common/template/driver.cxx index 08e4196..495365b 100644 --- a/common/template/driver.cxx +++ b/common/template/driver.cxx @@ -13,7 +13,7 @@ #include <odb/database.hxx> #include <odb/transaction.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/template/makefile b/common/template/makefile index cdc8f91..cff4185 100644 --- a/common/template/makefile +++ b/common/template/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -47,11 +47,20 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake) + $(call dist-data,$(sources) $(headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -82,6 +91,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) diff --git a/common/template/template-vc10.vcxproj b/common/template/template-vc10.vcxproj new file mode 100644 index 0000000..5e1936f --- /dev/null +++ b/common/template/template-vc10.vcxproj @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{__uuid__()}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>__value__(name)</RootNamespace> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>Unicode</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>$(Configuration)\</OutDir> + <TargetName>driver</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>$(Platform)\$(Configuration)\</OutDir> + <TargetName>driver</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(Configuration)\</OutDir> + <TargetName>driver</TargetName> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>$(Platform)\$(Configuration)\</OutDir> + <TargetName>driver</TargetName> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalDependencies>..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <AdditionalIncludeDirectories>..\..\libcommon</AdditionalIncludeDirectories> + </ClCompile> + <Link> + <AdditionalDependencies>..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib;%(AdditionalDependencies)</AdditionalDependencies> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> +__custom_build_entry__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) + </ItemGroup> + <ItemGroup> +__header_entry__(test-odb.hxx) +__header_entry__(test-odb.ixx) +__header_entries__(extra_headers) + </ItemGroup> + <ItemGroup> +__source_entry__(driver.cxx) +__source_entry__(test-odb.cxx) +__source_entries__(extra_sources) + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> diff --git a/common/template/template-vc10.vcxproj.filters b/common/template/template-vc10.vcxproj.filters new file mode 100644 index 0000000..f3ee658 --- /dev/null +++ b/common/template/template-vc10.vcxproj.filters @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> + <Extensions>cxx</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{__uuid__()}</UniqueIdentifier> + <Extensions>h;hxx;ixx;txx</Extensions> + </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) + </ItemGroup> + <ItemGroup> +__source_filter_entry__(driver.cxx) +__source_filter_entry__(test-odb.cxx) +__source_filter_entries__(extra_sources) + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/common/template/template-vc9.vcproj b/common/template/template-vc9.vcproj new file mode 100644 index 0000000..0cf2bc4 --- /dev/null +++ b/common/template/template-vc9.vcproj @@ -0,0 +1,356 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9.00" + Name="__value__(name)" + ProjectGUID="{__uuid__()}" + RootNamespace="__value__(name)" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + <Platform + Name="x64" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\libcommon" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="..\..\libcommon\lib\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib" + OutputFile="$(OutDir)\driver.exe" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="..\..\libcommon" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="..\..\libcommon\lib\common.lib;odb-__value__(database).lib;odb.lib" + OutputFile="$(OutDir)\driver.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\..\libcommon" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="..\..\libcommon\lib64\common-d.lib;odb-__value__(database)-d.lib;odb-d.lib" + OutputFile="$(OutDir)\driver.exe" + LinkIncremental="2" + GenerateDebugInformation="true" + SubSystem="1" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + TargetEnvironment="3" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="..\..\libcommon" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="2" + EnableFunctionLevelLinking="true" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="..\..\libcommon\lib64\common.lib;odb-__value__(database).lib;odb.lib" + OutputFile="$(OutDir)\driver.exe" + LinkIncremental="1" + GenerateDebugInformation="true" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="17" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cxx" + UniqueIdentifier="{__uuid__()}" + > +__source_entry__(driver.cxx) +__source_entry__(test-odb.cxx) +__source_entries__(extra_sources) + </Filter> + <Filter + Name="Header Files" + Filter="h;hxx;ixx;txx" + UniqueIdentifier="{__uuid__()}" + > +__file_entry_custom_build__( +test.hxx, +odb test.hxx, +odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)))) test.hxx, +test-odb.hxx;test-odb.ixx;test-odb.cxx) +__file_entry__(test-odb.hxx) +__file_entry__(test-odb.ixx) +__file_entries__(extra_headers) + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/common/test.bat b/common/test.bat new file mode 100644 index 0000000..678e678 --- /dev/null +++ b/common/test.bat @@ -0,0 +1,48 @@ +@echo off +rem file : common/test.bat +rem author : Boris Kolpackov <boris@codesynthesis.com> +rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +setlocal + +set "tests=__path__(dirs) __path__(thread_dirs)" +set "confs=__path__(configurations)" +set "topdir=__path__(topdir)\.." + +goto start + +:run_test + cd %1 + + if exist %2\driver.exe ( + echo %1\%2 + call %topdir%\tester.bat tracer %2 + if errorlevel 1 ( + set "failed=%failed% %1\%2" + ) + ) + + cd .. +goto :eof + +:start + +for %%t in (%tests%) do ( + for %%c in (%confs%) do ( + call :run_test %%t %%c + ) +) + +if not "_%failed%_" == "__" goto error + +echo ALL TESTS PASSED +goto end + +:error +for %%t in (%failed%) do echo FAILED: %%t +exit /b 1 +goto end + +:end +endlocal diff --git a/common/threads/driver.cxx b/common/threads/driver.cxx index c883bba..dd2d9f6 100644 --- a/common/threads/driver.cxx +++ b/common/threads/driver.cxx @@ -17,7 +17,7 @@ #include <odb/details/shared-ptr.hxx> #include <odb/details/thread.hxx> -#include <common.hxx> +#include <common/common.hxx> #include "test.hxx" #include "test-odb.hxx" diff --git a/common/threads/makefile b/common/threads/makefile index 6a8c802..73174d9 100644 --- a/common/threads/makefile +++ b/common/threads/makefile @@ -10,8 +10,8 @@ odb_hdr := test.hxx cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(odb_hdr:.hxx=-odb.o)) cxx_od := $(cxx_obj:.o=.o.d) -common.l := $(out_root)/libcommon/common.l -common.l.cpp-options := $(out_root)/libcommon/common.l.cpp-options +common.l := $(out_root)/libcommon/common/common.l +common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options driver := $(out_base)/driver dist := $(out_base)/.dist @@ -48,11 +48,20 @@ $(out_base)/: $(driver) # Dist # -$(dist): data_dist := $(cxx_tun) $(odb_hdr) test.std +name := $(notdir $(src_base)) + $(dist): db_id := @database@ +$(dist): sources := $(cxx_tun) +$(dist): headers := $(odb_hdr) +$(dist): data_dist := test.std +$(dist): export name := $(name) +$(dist): export extra_dist := $(data_dist) $(call vc9projs,$(name)) \ +$(call vc10projs,$(name)) $(dist): - $(call dist-data,$(data_dist)) - $(call meta-automake,$(src_root)/common/template/Makefile.am) + $(call dist-data,$(sources) $(headers) $(data_dist)) + $(call meta-automake,../template/Makefile.am) + $(call meta-vc9projs,../template/template,$(name)) + $(call meta-vc10projs,../template/template,$(name)) # Test. # @@ -83,6 +92,8 @@ endif # How to. # $(call include,$(bld_root)/dist.make) +$(call include,$(bld_root)/meta/vc9proj.make) +$(call include,$(bld_root)/meta/vc10proj.make) $(call include,$(bld_root)/meta/automake.make) $(call include,$(odb_rules)) |