summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-01-31 18:49:34 +0000
committerBernard Normier <bernard@zeroc.com>2007-01-31 18:49:34 +0000
commit0f76db6b442a9c7985adbe5b8a3f06469ccbe9b3 (patch)
treea04395675afff4f27841ab86f668117d7a9f7904 /cpp/src/Slice/CPlusPlusUtil.cpp
parentFixed bug 1720 (diff)
downloadice-0f76db6b442a9c7985adbe5b8a3f06469ccbe9b3.tar.bz2
ice-0f76db6b442a9c7985adbe5b8a3f06469ccbe9b3.tar.xz
ice-0f76db6b442a9c7985adbe5b8a3f06469ccbe9b3.zip
Beta versioning
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp32
1 files changed, 26 insertions, 6 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index bef622075e1..b4f9d48f8d0 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -99,12 +99,32 @@ Slice::printVersionCheck(Output& out)
{
out << "\n";
out << "\n#ifndef ICE_IGNORE_VERSION";
- out << "\n# if ICE_INT_VERSION / 100 != " << ICE_INT_VERSION / 100;
- out << "\n# error Ice version mismatch!";
- out << "\n# endif";
- out << "\n# if ICE_INT_VERSION % 100 < " << ICE_INT_VERSION % 100;
- out << "\n# error Ice patch level mismatch!";
- out << "\n# endif";
+ if(ICE_INT_VERSION % 100 > 50)
+ {
+ //
+ // Beta version: exact match required
+ //
+ out << "\n# if ICE_INT_VERSION != " << ICE_INT_VERSION;
+ out << "\n# error Ice version mismatch: an exact match is required for beta generated code";
+ out << "\n# endif";
+ }
+ else
+ {
+ out << "\n# if ICE_INT_VERSION / 100 != " << ICE_INT_VERSION / 100;
+ out << "\n# error Ice version mismatch!";
+ out << "\n# endif";
+
+ //
+ // Generated code is release; reject beta header
+ //
+ out << "\n# if ICE_INT_VERSION % 100 > 50";
+ out << "\n# error Beta header file detected";
+ out << "\n# endif";
+
+ out << "\n# if ICE_INT_VERSION % 100 < " << ICE_INT_VERSION % 100;
+ out << "\n# error Ice patch level mismatch!";
+ out << "\n# endif";
+ }
out << "\n#endif";
}