From 34a371625b17428aa0e35488499a2a7b69b0da27 Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Fri, 2 Mar 2012 12:29:37 +0200
Subject: C++11 support in automake and VC++ projects, portability fixes

---
 qt/common/template/Makefile.am           | 4 ++++
 qt/common/template/template-vc10.vcxproj | 2 +-
 qt/common/template/template-vc9.vcproj   | 2 +-
 qt/mssql/template/Makefile.am            | 4 ++++
 qt/mssql/template/template-vc10.vcxproj  | 2 +-
 qt/mssql/template/template-vc9.vcproj    | 2 +-
 qt/mysql/template/Makefile.am            | 4 ++++
 qt/mysql/template/template-vc10.vcxproj  | 2 +-
 qt/mysql/template/template-vc9.vcproj    | 2 +-
 qt/oracle/template/Makefile.am           | 4 ++++
 qt/oracle/template/template-vc10.vcxproj | 2 +-
 qt/oracle/template/template-vc9.vcproj   | 2 +-
 qt/pgsql/template/Makefile.am            | 4 ++++
 qt/pgsql/template/template-vc10.vcxproj  | 2 +-
 qt/pgsql/template/template-vc9.vcproj    | 2 +-
 qt/sqlite/template/Makefile.am           | 4 ++++
 qt/sqlite/template/template-vc10.vcxproj | 2 +-
 qt/sqlite/template/template-vc9.vcproj   | 2 +-
 18 files changed, 36 insertions(+), 12 deletions(-)

(limited to 'qt')

diff --git a/qt/common/template/Makefile.am b/qt/common/template/Makefile.am
index a15f7b8..4101392 100644
--- a/qt/common/template/Makefile.am
+++ b/qt/common/template/Makefile.am
@@ -24,5 +24,9 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS)  __value__(odb_options) $<
diff --git a/qt/common/template/template-vc10.vcxproj b/qt/common/template/template-vc10.vcxproj
index 5283a7e..1c4b458 100644
--- a/qt/common/template/template-vc10.vcxproj
+++ b/qt/common/template/template-vc10.vcxproj
@@ -158,7 +158,7 @@
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(m4_patsubst(__value__(odb_options), @database@, __value__(database)) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) 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)
   </ItemGroup>
   <ItemGroup>
diff --git a/qt/common/template/template-vc9.vcproj b/qt/common/template/template-vc9.vcproj
index 1ad9a61..e8a6a3c 100644
--- a/qt/common/template/template-vc9.vcproj
+++ b/qt/common/template/template-vc9.vcproj
@@ -348,7 +348,7 @@ __source_entries__(extra_sources)
 __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 -I$(SolutionDir)\..\..\libcommon)) 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)
diff --git a/qt/mssql/template/Makefile.am b/qt/mssql/template/Makefile.am
index 33b0868..7d944cc 100644
--- a/qt/mssql/template/Makefile.am
+++ b/qt/mssql/template/Makefile.am
@@ -26,6 +26,10 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
 )
diff --git a/qt/mssql/template/template-vc10.vcxproj b/qt/mssql/template/template-vc10.vcxproj
index d913afc..a3477e0 100644
--- a/qt/mssql/template/template-vc10.vcxproj
+++ b/qt/mssql/template/template-vc10.vcxproj
@@ -160,7 +160,7 @@ m4_dnl
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx,
 test-odb.hxx;test-odb.ixx;test-odb.cxx)
   </ItemGroup>)
   <ItemGroup>
diff --git a/qt/mssql/template/template-vc9.vcproj b/qt/mssql/template/template-vc9.vcproj
index dc38c43..dc06622 100644
--- a/qt/mssql/template/template-vc9.vcproj
+++ b/qt/mssql/template/template-vc9.vcproj
@@ -349,7 +349,7 @@ m4_ifelse(__value__(odb_options),,,
 __file_entry_custom_build__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options) -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))
diff --git a/qt/mysql/template/Makefile.am b/qt/mysql/template/Makefile.am
index 1c8a6a6..1fe0055 100644
--- a/qt/mysql/template/Makefile.am
+++ b/qt/mysql/template/Makefile.am
@@ -26,6 +26,10 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
 )
diff --git a/qt/mysql/template/template-vc10.vcxproj b/qt/mysql/template/template-vc10.vcxproj
index d366643..0460825 100644
--- a/qt/mysql/template/template-vc10.vcxproj
+++ b/qt/mysql/template/template-vc10.vcxproj
@@ -160,7 +160,7 @@ m4_dnl
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx,
 test-odb.hxx;test-odb.ixx;test-odb.cxx)
   </ItemGroup>)
   <ItemGroup>
diff --git a/qt/mysql/template/template-vc9.vcproj b/qt/mysql/template/template-vc9.vcproj
index a9b474a..031e923 100644
--- a/qt/mysql/template/template-vc9.vcproj
+++ b/qt/mysql/template/template-vc9.vcproj
@@ -349,7 +349,7 @@ m4_ifelse(__value__(odb_options),,,
 __file_entry_custom_build__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options) -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))
diff --git a/qt/oracle/template/Makefile.am b/qt/oracle/template/Makefile.am
index 5d19be3..6e23f58 100644
--- a/qt/oracle/template/Makefile.am
+++ b/qt/oracle/template/Makefile.am
@@ -26,6 +26,10 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
 )
diff --git a/qt/oracle/template/template-vc10.vcxproj b/qt/oracle/template/template-vc10.vcxproj
index d984502..0ea856a 100644
--- a/qt/oracle/template/template-vc10.vcxproj
+++ b/qt/oracle/template/template-vc10.vcxproj
@@ -160,7 +160,7 @@ m4_dnl
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx,
 test-odb.hxx;test-odb.ixx;test-odb.cxx)
   </ItemGroup>)
   <ItemGroup>
diff --git a/qt/oracle/template/template-vc9.vcproj b/qt/oracle/template/template-vc9.vcproj
index 563a440..a350894 100644
--- a/qt/oracle/template/template-vc9.vcproj
+++ b/qt/oracle/template/template-vc9.vcproj
@@ -349,7 +349,7 @@ m4_ifelse(__value__(odb_options),,,
 __file_entry_custom_build__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options) -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))
diff --git a/qt/pgsql/template/Makefile.am b/qt/pgsql/template/Makefile.am
index 5a99cfa..f5f1eed 100644
--- a/qt/pgsql/template/Makefile.am
+++ b/qt/pgsql/template/Makefile.am
@@ -26,6 +26,10 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
 )
diff --git a/qt/pgsql/template/template-vc10.vcxproj b/qt/pgsql/template/template-vc10.vcxproj
index 37ce9a0..bc51721 100644
--- a/qt/pgsql/template/template-vc10.vcxproj
+++ b/qt/pgsql/template/template-vc10.vcxproj
@@ -160,7 +160,7 @@ m4_dnl
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx,
 test-odb.hxx;test-odb.ixx;test-odb.cxx)
   </ItemGroup>)
   <ItemGroup>
diff --git a/qt/pgsql/template/template-vc9.vcproj b/qt/pgsql/template/template-vc9.vcproj
index fa20737..19cffcf 100644
--- a/qt/pgsql/template/template-vc9.vcproj
+++ b/qt/pgsql/template/template-vc9.vcproj
@@ -349,7 +349,7 @@ m4_ifelse(__value__(odb_options),,,
 __file_entry_custom_build__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options) -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))
diff --git a/qt/sqlite/template/Makefile.am b/qt/sqlite/template/Makefile.am
index 0448971..2470afe 100644
--- a/qt/sqlite/template/Makefile.am
+++ b/qt/sqlite/template/Makefile.am
@@ -26,6 +26,10 @@ ODB = @ODB@
 ODBFLAGS = @ODBFLAGS@
 ODBCPPFLAGS = @ODBCPPFLAGS@
 
+if HAVE_CXX11
+ODBFLAGS += --std c++11
+endif
+
 test-odb.hxx: test.hxx
 	$(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $<
 )
diff --git a/qt/sqlite/template/template-vc10.vcxproj b/qt/sqlite/template/template-vc10.vcxproj
index c299610..d705b5c 100644
--- a/qt/sqlite/template/template-vc10.vcxproj
+++ b/qt/sqlite/template/template-vc10.vcxproj
@@ -160,7 +160,7 @@ m4_dnl
 __custom_build_entry__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\..\libcommon)) test.hxx,
 test-odb.hxx;test-odb.ixx;test-odb.cxx)
   </ItemGroup>)
   <ItemGroup>
diff --git a/qt/sqlite/template/template-vc9.vcproj b/qt/sqlite/template/template-vc9.vcproj
index c4c3b95..962bde9 100644
--- a/qt/sqlite/template/template-vc9.vcproj
+++ b/qt/sqlite/template/template-vc9.vcproj
@@ -349,7 +349,7 @@ m4_ifelse(__value__(odb_options),,,
 __file_entry_custom_build__(
 test.hxx,
 odb test.hxx,
-odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -I$(SolutionDir)\..\..\libcommon)) test.hxx,
+odb.exe __xml__(__shell_quotes__(__value__(odb_options) -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))
-- 
cgit v1.1