From: Anthony Geay Date: Wed, 26 Apr 2017 12:58:25 +0000 (+0200) Subject: Revert 79a93c17c2a015e15f4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fagy%2Ffloat32;p=tools%2Fmedcoupling.git Revert 79a93c17c2a015e15f4 --- diff --git a/MEDCouplingConfig.cmake.in b/MEDCouplingConfig.cmake.in index fdfaa65de..8621eead1 100644 --- a/MEDCouplingConfig.cmake.in +++ b/MEDCouplingConfig.cmake.in @@ -116,7 +116,6 @@ SET(MEDCOUPLING_INSTALL_DOC "@MEDCOUPLING_INSTALL_BINS@") SET(MEDCoupling_interpkernel interpkernel) SET(MEDCoupling_medcoupling medcoupling) SET(MEDCoupling_medcouplingremapper medcouplingremapper) -SET(MEDCoupling_medcouplinghelpyer medcouplinghelpyer) SET(MEDCoupling_medloader medloader) SET(MEDCoupling_renumbercpp renumbercpp) SET(MEDCoupling_medpartitionercpp medpartitionercpp) diff --git a/src/MEDCoupling_Swig/CMakeLists.txt b/src/MEDCoupling_Swig/CMakeLists.txt index 1bd321ef9..9a3a0f16d 100644 --- a/src/MEDCoupling_Swig/CMakeLists.txt +++ b/src/MEDCoupling_Swig/CMakeLists.txt @@ -88,12 +88,8 @@ IF(MEDCOUPLING_BUILD_DOC) swig_ready) ENDIF() -ADD_LIBRARY(medcouplinghelpyer MEDCouplingDataArrayTraits.cxx) -TARGET_LINK_LIBRARIES(medcouplinghelpyer ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcoupling) -INSTALL(TARGETS medcouplinghelpyer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS}) - SWIG_ADD_MODULE(MEDCoupling python MEDCoupling.i) -SWIG_LINK_LIBRARIES(MEDCoupling medcouplinghelpyer) +SWIG_LINK_LIBRARIES(MEDCoupling ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcoupling) SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow") @@ -105,7 +101,7 @@ SET (SWIG_MODULE_MEDCouplingRemapper_EXTRA_DEPS ${MEDCoupling_SWIG_DPYS_FILES} ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX}) SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i) -SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper medcouplinghelpyer) +SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper) IF(WIN32) SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d) diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.cxx b/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.cxx deleted file mode 100644 index d7ad14197..000000000 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTraits.cxx +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2007-2017 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 -// -// Author : Anthony Geay (EDF R&D) - -#include "MEDCouplingDataArrayTraits.hxx" - -PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayDouble_RefType; - -PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayFloat_RefType; diff --git a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i index a17faf183..ef8946fbf 100644 --- a/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingDataArrayTypemaps.i @@ -3005,6 +3005,10 @@ struct SWIGTITraits swig_type_info *SWIGTITraits::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayDouble is null when called here ! Postpone initialization at inlined initializeMe() swig_type_info *SWIGTITraits::TI=NULL;//unfortunately SWIGTYPE_p_MEDCoupling__DataArrayFloat is null when called here ! Postpone initialization at inlined initializeMe() +PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayDouble_RefType; + +PyTypeObject *NPYTraits::NPYFunc=&PyCallBackDataArrayFloat_RefType; + template typename MEDCoupling::Traits::ArrayType *DataArrayT__setitem__(typename MEDCoupling::Traits::ArrayType *self, PyObject *obj, PyObject *value) { diff --git a/src/MEDLoader/Swig/CMakeLists.txt b/src/MEDLoader/Swig/CMakeLists.txt index 80c2f4a22..5377a3db3 100644 --- a/src/MEDLoader/Swig/CMakeLists.txt +++ b/src/MEDLoader/Swig/CMakeLists.txt @@ -63,7 +63,7 @@ IF(MEDCOUPLING_BUILD_DOC) ENDIF() SWIG_ADD_MODULE(MEDLoader python MEDLoader.i) -SWIG_LINK_LIBRARIES(MEDLoader medloader medcouplinghelpyer) +SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medloader medcoupling) IF(WIN32) SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES DEBUG_OUTPUT_NAME _MEDLoader_d) ENDIF(WIN32) diff --git a/src/MEDPartitioner_Swig/CMakeLists.txt b/src/MEDPartitioner_Swig/CMakeLists.txt index b24d4cead..3e025745f 100644 --- a/src/MEDPartitioner_Swig/CMakeLists.txt +++ b/src/MEDPartitioner_Swig/CMakeLists.txt @@ -49,7 +49,7 @@ INCLUDE_DIRECTORIES( ) SWIG_ADD_MODULE(MEDPartitioner python MEDPartitioner.i) -SWIG_LINK_LIBRARIES(MEDPartitioner medpartitionercpp medcouplinghelpyer) +SWIG_LINK_LIBRARIES(MEDPartitioner ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medpartitionercpp) IF(WIN32) SET_TARGET_PROPERTIES(_MEDPartitioner PROPERTIES DEBUG_OUTPUT_NAME _MEDPartitioner_d) diff --git a/src/ParaMEDMEM_Swig/CMakeLists.txt b/src/ParaMEDMEM_Swig/CMakeLists.txt index 2b8697538..603a63ad3 100644 --- a/src/ParaMEDMEM_Swig/CMakeLists.txt +++ b/src/ParaMEDMEM_Swig/CMakeLists.txt @@ -53,7 +53,7 @@ SET (SWIG_MODULE_ParaMEDMEM_EXTRA_DEPS ${ParaMEDMEM_SWIG_DPYS_FILES} ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX}) SWIG_ADD_MODULE(ParaMEDMEM python ParaMEDMEM.i) -SWIG_LINK_LIBRARIES(ParaMEDMEM paramedmem medloader medcouplinghelpyer) +SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBRARIES} paramedmem medloader) SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_DEFINITIONS "-shadow") diff --git a/src/RENUMBER_Swig/CMakeLists.txt b/src/RENUMBER_Swig/CMakeLists.txt index a6f6de555..95e83e3df 100644 --- a/src/RENUMBER_Swig/CMakeLists.txt +++ b/src/RENUMBER_Swig/CMakeLists.txt @@ -53,7 +53,7 @@ INCLUDE_DIRECTORIES( ) SWIG_ADD_MODULE(MEDRenumber python MEDRenumber.i) -SWIG_LINK_LIBRARIES(MEDRenumber renumbercpp medcouplinghelpyer) +SWIG_LINK_LIBRARIES(MEDRenumber ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} renumbercpp) IF(WIN32) SET_TARGET_PROPERTIES(_MEDRenumber PROPERTIES DEBUG_OUTPUT_NAME _MEDRenumber_d)