From 3d4dfa4cab83712e332d3934e6fadf0a2cbf28c2 Mon Sep 17 00:00:00 2001 From: ana Date: Tue, 20 Sep 2011 14:32:13 +0000 Subject: [PATCH] Integrate patches for win32 version --- salome_adm/cmake_files/FindBOOST.cmake | 15 +++++++++------ salome_adm/cmake_files/FindHDF5.cmake | 3 ++- salome_adm/cmake_files/FindPLATFORM.cmake | 2 ++ salome_adm/cmake_files/am2cmake.py | 22 ++++++++++++++++++---- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/salome_adm/cmake_files/FindBOOST.cmake b/salome_adm/cmake_files/FindBOOST.cmake index cbdc974f7..979707938 100644 --- a/salome_adm/cmake_files/FindBOOST.cmake +++ b/salome_adm/cmake_files/FindBOOST.cmake @@ -124,22 +124,25 @@ IF(BOOST_STATUS) SET(STATIC_LIB_NAMES) FOREACH(version 1_35 1_38 1_42 1_46_1) SET(LIB_NAMES ${LIB_NAMES} boost_${name}-vc90-mt${EXTENSION}-${version}) - SET(STATIC_LIB_NAMES ${LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version}) + SET(STATIC_LIB_NAMES ${STATIC_LIB_NAMES} libboost_${name}-vc90-mt${EXTENSION}-${version}) ENDFOREACH(version 1_35 1_38 1_42 1_46_1) FIND_LIBRARY(BOOST_LIB_${name} NAMES ${LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}}) IF(NOT BOOST_LIB_${name}) - FIND_LIBRARY(BOOST_LIB_${name} NAMES ${STATIS_LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + FIND_LIBRARY(STATIC_BOOST_LIB_${name} NAMES ${STATIC_LIB_NAMES} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${STATIC_BOOST_LIB_${name}}) SET(BOOST_ENABLE_DLL 0) ENDIF(NOT BOOST_LIB_${name}) ELSE(WINDOWS) FIND_LIBRARY(BOOST_LIB_${name} boost_${name} PATHS ${BOOST_LIB_PATHS} ${BOOST_FIND_PATHS_OPTION}) + SET(BOOST_LIB_${name}_FOUNDED ${BOOST_LIB_${name}}) ENDIF(WINDOWS) - IF(NOT BOOST_LIB_${name}) + IF(NOT BOOST_LIB_${name}_FOUNDED) SET(BOOST_STATUS 0) - ENDIF(NOT BOOST_LIB_${name}) + ENDIF(NOT BOOST_LIB_${name}_FOUNDED) STRING(TOUPPER ${name} upname) - SET(BOOST_LIB_${upname} ${BOOST_LIB_${name}}) - SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_${name}}) + SET(BOOST_LIB_${upname} ${BOOST_LIB_${name}_FOUNDED}) + SET(BOOST_LIBS ${BOOST_LIBS} ${BOOST_LIB_${name}_FOUNDED}) ENDFOREACH(name thread date_time signals filesystem system) ENDIF(BOOST_STATUS) diff --git a/salome_adm/cmake_files/FindHDF5.cmake b/salome_adm/cmake_files/FindHDF5.cmake index 2523be15e..c3d52e6a2 100644 --- a/salome_adm/cmake_files/FindHDF5.cmake +++ b/salome_adm/cmake_files/FindHDF5.cmake @@ -122,7 +122,7 @@ ENDIF(HDF5_STATUS) IF(HDF5_STATUS) IF(HDF5_ROOT_USER) IF(WINDOWS) - SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/dll) + SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/dll ${HDF5_ROOT_USER}/lib) ELSE(WINDOWS) SET(HDF5_LIB_PATHS ${HDF5_ROOT_USER}/lib) ENDIF(WINDOWS) @@ -155,6 +155,7 @@ ENDIF(HDF5_STATUS) # ---- IF(HDF5_STATUS) + SET(HDF5_CPPFLAGS ${HDF5_INCLUDES}) ELSE(HDF5_STATUS) IF(HDF5_IS_MANDATORY) MESSAGE(FATAL_ERROR "hdf5 not found ... mandatory ... abort") diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index 8f4bbbf9f..bd7628882 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -103,6 +103,8 @@ ENDIF(WINDOWS) SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4) +SET(COMPILATION_WITH_CMAKE ON) + # SET(PLATFORM_CPPFLAGS) # # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS) # # SET(RM del) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index b7e5c804d..8e819ee23 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -687,9 +687,9 @@ class CMakeFile(object): pass elif self.module == "medfile": newlines.append(""" - SET(MED_NUM_MAJEUR 2) - SET(MED_NUM_MINEUR 3) - SET(MED_NUM_RELEASE 5) + SET(MED_NUM_MAJEUR 3) + SET(MED_NUM_MINEUR 0) + SET(MED_NUM_RELEASE 3) SET(LONG_OR_INT int) IF(NOT WINDOWS) SET(FLIBS -lgfortranbegin -lgfortran) @@ -863,7 +863,21 @@ class CMakeFile(object): # If the line begins with 'include ', just comment it # -- if line.find("include ") == 0: - newlines.append("# " + line) + if line.find("include $(top_srcdir)/config/automake.common") == 0: + for l in [ + "MAINTAINERCLEANFILES = Makefile.in", + "AM_CPPFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_FFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_FCFLAGS=-I$(top_srcdir)/include -I$(top_builddir)/include", + "AM_CPPFLAGS+=@HDF5_CPPFLAGS@", + "AM_LDFLAGS=@HDF5_LDFLAGS@", + ]: + self.treatLine(l, newlines, opened_ifs) + pass + pass + else: + newlines.append("# " + line) + pass return # -- -- 2.39.2