Salome HOME
[ICoCo] renamed header and symbol for decl spec V9_7_BR V9_7_0 V9_7_0rc2
authorabn <adrien.bruneton@cea.fr>
Mon, 10 May 2021 11:54:01 +0000 (13:54 +0200)
committervsr <vsr@opencascade.com>
Wed, 19 May 2021 14:02:05 +0000 (17:02 +0300)
+ shell script to test equality between GitHub and MC version

src/ICoCo/ICoCo.hxx [deleted file]
src/ICoCo/ICoCoField.hxx
src/ICoCo/ICoCoMEDDoubleField.hxx
src/ICoCo/ICoCoMEDIntField.hxx
src/ICoCo/ICoCo_DeclSpec.hxx [new file with mode: 0644]
src/ICoCo/Swig/ICoCoMEDField.i
src/ICoCo/github/check_consistency.sh [new file with mode: 0755]
src/ParaMEDMEM_Swig/ParaMEDMEM.i
src/PyWrapping/medcoupling.i

diff --git a/src/ICoCo/ICoCo.hxx b/src/ICoCo/ICoCo.hxx
deleted file mode 100644 (file)
index e523f70..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-
-// WARNING: this file is part of the official ICoCo API and should not be modified.
-// The official version can be found at the following URL:
-//
-//    https://github.com/cea-trust-platform/icoco-coupling
-
-#ifndef ICoCo_included
-
-#ifdef WIN32
-#  if defined medicoco_EXPORTS
-#    define MEDCOUPLINGICOCO_EXPORT __declspec( dllexport )
-#  else
-#    define MEDCOUPLINGICOCO_EXPORT __declspec( dllimport )
-#  endif
-#else
-#  define MEDCOUPLINGICOCO_EXPORT
-#endif
-
-#endif // ICoCo_included
index ea4959e2ef033e126554e638f0329f5b18e8b1ea..5f66d1984226f35f5a856bfc78b42b77a2fcd96a 100644 (file)
@@ -26,7 +26,7 @@
 #define ICoCoField_included
 #include <string>
 
-#include "ICoCo.hxx"
+#include <ICoCo_DeclSpec.hxx>
 
 namespace ICoCo
 {
@@ -34,7 +34,7 @@ namespace ICoCo
    *
    * The Field class holds the name of the field.
    */
-  class MEDCOUPLINGICOCO_EXPORT Field
+  class ICOCO_EXPORT Field
   {
   public:
     /*! @brief Set the name of the field.
index ef68ea9a03988573d61c427d9f7129b533d392c9..dcaa36524ab033e33d7bffe3e811c037ba196b3d 100644 (file)
@@ -26,7 +26,6 @@
 #define ICoCoMEDDoubleField_included
 
 #include "ICoCoField.hxx"
-#include "ICoCo.hxx"
 
 namespace MEDCoupling
 {
@@ -45,7 +44,7 @@ namespace ICoCo
    * @sa the MEDCoupling documentation, notably the reference counter mechanism used to manage the lifecycle of
    * MEDCoupling objects.
    */
-  class MEDCOUPLINGICOCO_EXPORT MEDDoubleField : public ICoCo::Field
+  class ICOCO_EXPORT MEDDoubleField : public ICoCo::Field
   {
   public:
     /*! Builds an empty field (internal MEDCoupling object not set).
index 1adfbc8598a4d7d8a1e84b58e7f21254ba75a3dc..31c7454b9543091f83d74c900291c089823ce0ba 100644 (file)
@@ -44,7 +44,7 @@ namespace ICoCo
    * @sa the MEDCoupling documentation, notably the reference counter mechanism used to manage the lifecycle of
    * MEDCoupling objects.
    */
-  class MEDCOUPLINGICOCO_EXPORT MEDIntField : public ICoCo::Field
+  class ICOCO_EXPORT MEDIntField : public ICoCo::Field
   {
   public:
     /*! Builds an empty field (internal MEDCoupling object not set).
diff --git a/src/ICoCo/ICoCo_DeclSpec.hxx b/src/ICoCo/ICoCo_DeclSpec.hxx
new file mode 100644 (file)
index 0000000..648130b
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// WARNING: this file is part of the official ICoCo API and should not be modified.
+// The official version can be found at the following URL:
+//
+//    https://github.com/cea-trust-platform/icoco-coupling
+
+#ifndef ICoCo_DeclSpec_included
+
+#ifdef WIN32
+#  if defined medicoco_EXPORTS
+#    define ICOCO_EXPORT __declspec( dllexport )
+#  else
+#    define ICOCO_EXPORT __declspec( dllimport )
+#  endif
+#else
+#  define ICOCO_EXPORT
+#endif
+
+#endif // ICoCo_DeclSpec_included
index f12c210d8a0a9dc6c9d38ceb3646a1b983e1b371..9f992ac3584a45d696373f436214d28f5f74540a 100644 (file)
@@ -23,6 +23,8 @@
 #include "ICoCoMEDIntField.hxx"
 %}
 
+#define ICOCO_EXPORT
+
 %include "std_string.i"
 %include "ICoCoField.hxx"
 
diff --git a/src/ICoCo/github/check_consistency.sh b/src/ICoCo/github/check_consistency.sh
new file mode 100755 (executable)
index 0000000..c593745
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#
+# Check that the ICoCo headers used in MEDCoupling are well synchronized with the official ICoCo version 
+# hosted at:
+#   https://github.com/cea-trust-platform/icoco-coupling
+#
+
+rm -rf icoco-coupling
+rm -rf tmp_compare
+
+git clone https://github.com/cea-trust-platform/icoco-coupling.git
+
+lst="ICoCo_DeclSpec.hxx ICoCoField.h ICoCoField.hxx ICoCoMEDDoubleField.h ICoCoMEDDoubleField.hxx ICoCoMEDIntField.h ICoCoMEDIntField.hxx"
+
+mkdir tmp_compare
+cd tmp_compare
+for f in $lst; do
+    tail -n+4 ../icoco-coupling/include/$f > "${f}_github"
+    tail -n+20 ../../$f > "${f}_mc"
+    diff "${f}_github" "${f}_mc"
+    if [ ! $? -eq 0 ]; then
+        echo "File $f is not the same in MEDCoupling repository and in official ICoCo GitHub repository!!"
+        exit 1
+    fi
+done
+
+cd ..
+rm -rf icoco-coupling
+rm -rf tmp_compare
+
index 5aee5c600b039bbc5313e8a7dc1025dc40145d33..40d0bd8db2d06a91f611d4d7dbdf193ad3ed728f 100644 (file)
@@ -23,7 +23,6 @@
 
 #define MEDCOUPLING_EXPORT
 #define INTERPKERNEL_EXPORT
-#define MEDCOUPLINGICOCO_EXPORT 
 
 %include "MEDCouplingCommon.i"
 %include "ICoCoMEDField.i"
index 7fe41863a6627b5934c3c3ad46d867018fb0cfe1..3c7a0e6d1d0f11000c1c0bb572d5cb6703c19a32 100644 (file)
@@ -25,7 +25,6 @@
 #define INTERPKERNEL_EXPORT
 #define MEDCOUPLING_EXPORT
 #define MEDLOADER_EXPORT
-#define MEDCOUPLINGICOCO_EXPORT
 
 %include "MEDCouplingCommon.i"