From: Viktor UZLOV Date: Thu, 28 Jan 2021 08:51:16 +0000 (+0300) Subject: correct define SALOME_USE_64BIT_IDS X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f74773037ae75c7f4eddf13086e4c97c339615f;p=modules%2Fkernel.git correct define SALOME_USE_64BIT_IDS --- diff --git a/SalomeKERNELConfig.cmake.in b/SalomeKERNELConfig.cmake.in index c01f6fdf9..4d4ce7c00 100644 --- a/SalomeKERNELConfig.cmake.in +++ b/SalomeKERNELConfig.cmake.in @@ -66,6 +66,7 @@ SET(SALOME_KERNEL_BUILD_DOC @SALOME_BUILD_DOC@) SET(SALOME_KERNEL_BUILD_TESTS @SALOME_BUILD_TESTS@) SET(SALOME_KERNEL_LIGHT_ONLY @SALOME_LIGHT_ONLY@) SET(SALOME_USE_LIBBATCH @SALOME_USE_LIBBATCH@) +SET(SALOME_USE_64BIT_IDS @SALOME_USE_64BIT_IDS@) # Prerequisites: IF(SALOME_KERNEL_BUILD_TESTS) diff --git a/src/Basics/CMakeLists.txt b/src/Basics/CMakeLists.txt index 098b63b8a..8096bfe87 100644 --- a/src/Basics/CMakeLists.txt +++ b/src/Basics/CMakeLists.txt @@ -29,7 +29,6 @@ SET(SALOMEBasics_SOURCES BasicsGenericDestructor.hxx Basics_Utils.hxx Basics_DirUtils.hxx - smIdType.hxx ) ADD_LIBRARY(SALOMEBasics ${SALOMEBasics_SOURCES}) @@ -39,3 +38,5 @@ TARGET_LINK_LIBRARIES(SALOMEBasics ${PLATFORM_LIBS} ${PTHREAD_LIBRARIES}) FILE(GLOB SALOMEBasics_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") INSTALL(FILES ${SALOMEBasics_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS}) + +SALOME_CONFIGURE_FILE(smIdType.hxx.in smIdType.hxx INSTALL ${SALOME_INSTALL_HEADERS}) \ No newline at end of file diff --git a/src/Basics/smIdType.hxx b/src/Basics/smIdType.hxx deleted file mode 100644 index 5090b0456..000000000 --- a/src/Basics/smIdType.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// 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 - -#ifndef SALOME_USE_64BIT_IDS -typedef std::int32_t smIdType; -#else -typedef std::int64_t smIdType; -#endif - -#endif //_SMIDTYPE_HXX_ diff --git a/src/Basics/smIdType.hxx.in b/src/Basics/smIdType.hxx.in new file mode 100644 index 000000000..b97de4a1f --- /dev/null +++ b/src/Basics/smIdType.hxx.in @@ -0,0 +1,36 @@ +// 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_ + +#cmakedefine SALOME_USE_64BIT_IDS + +#include + +#ifndef SALOME_USE_64BIT_IDS +typedef std::int32_t smIdType; +#else +typedef std::int64_t smIdType; +#endif + +#endif //_SMIDTYPE_HXX_