]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
add 64bit options and typedef
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Mon, 25 Jan 2021 06:42:07 +0000 (09:42 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Mon, 25 Jan 2021 06:42:07 +0000 (09:42 +0300)
CMakeLists.txt
idl/CMakeLists.txt
idl/SALOME_Types_IDS.idl.in [new file with mode: 0644]
src/Basics/CMakeLists.txt
src/Basics/smIdType.hxx [new file with mode: 0644]

index cec193a87d2836f817e645d08a45312969767b64..78ff10ca2c081a8e38393137da1f384265ade9fd 100755 (executable)
@@ -61,6 +61,7 @@ OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON)
 # Advanced:
 OPTION(SALOME_LIGHT_ONLY "Build SALOME Light only (no CORBA)" OFF)
 OPTION(SALOME_USE_LIBBATCH "Use LibBatch in KERNEL" OFF)
+OPTION(SALOME_USE_64BIT_IDS "Size of IDs to refer cells and nodes. 32 bits when OFF (default), 64 bits when ON." ON)
 CMAKE_DEPENDENT_OPTION(SALOME_PACO_PARALLEL "Build with PACO (implies SALOME_USE_MPI)" OFF
                        "NOT SALOME_LIGHT_ONLY" OFF)
 CMAKE_DEPENDENT_OPTION(SALOME_USE_MPI "Use MPI containers" OFF
index fcd45f5000ff4c37f9568d76e3a839b71090edce..2202d6876beab62b261614282fa64dcd5d524378 100644 (file)
@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
 )
 
 SALOME_CONFIGURE_FILE(Calcium_Ports.idl.in Calcium_Ports.idl)
+SALOME_CONFIGURE_FILE(SALOME_Types_IDS.idl.in SALOME_Types_IDS.idl)
 
 SET(SalomeIDLKernel_IDLSOURCES
   SALOME_Exception.idl
@@ -56,6 +57,7 @@ SET(SalomeIDLKernel_IDLSOURCES
   SALOME_CommonTypes.idl
   SALOME_ExternalServerLauncher.idl
   ${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
+  ${CMAKE_CURRENT_BINARY_DIR}/SALOME_Types_IDS.idl
 )
 
 IF(SALOME_USE_MPI)
diff --git a/idl/SALOME_Types_IDS.idl.in b/idl/SALOME_Types_IDS.idl.in
new file mode 100644 (file)
index 0000000..d0e7ad9
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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
+//
+
+#ifndef __SALOME_TYPES_IDS_IDL__
+#define __SALOME_TYPES_IDS_IDL__
+
+module SALOME
+{
+  #ifndef SALOME_USE_64BIT_IDS
+  typedef long smIdType;
+  #else
+  typedef long long smIdType;
+  #endif
+};
+
+#endif
index c71e78f94a44102a85c545c1d4b6e21567b91ef1..098b63b8a326ca3e35c3d159c98e3d7a9e60d6ba 100644 (file)
@@ -29,6 +29,7 @@ SET(SALOMEBasics_SOURCES
   BasicsGenericDestructor.hxx
   Basics_Utils.hxx
   Basics_DirUtils.hxx
+  smIdType.hxx
 )
 
 ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES})
diff --git a/src/Basics/smIdType.hxx b/src/Basics/smIdType.hxx
new file mode 100644 (file)
index 0000000..5090b04
--- /dev/null
@@ -0,0 +1,34 @@
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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
+//
+
+//  SALOME Basics : general SALOME definitions and tools (C++ part - no CORBA)
+//  File   : smIdType.hxx
+
+#ifndef _SMIDTYPE_HXX_
+#define _SMIDTYPE_HXX_
+
+#include <cinttypes>
+
+#ifndef SALOME_USE_64BIT_IDS
+typedef std::int32_t smIdType;
+#else
+typedef std::int64_t smIdType;
+#endif
+
+#endif //_SMIDTYPE_HXX_