From: adam Date: Fri, 11 Jun 2010 13:06:47 +0000 (+0000) Subject: cmake on 64 bits X-Git-Tag: Plotenh~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ded9715fb135fca55bdb65a9843b1476ad9d62a9;p=modules%2Fkernel.git cmake on 64 bits --- diff --git a/salome_adm/cmake_files/FindPLATFORM.cmake b/salome_adm/cmake_files/FindPLATFORM.cmake index 01f1e1512..f467aae1a 100644 --- a/salome_adm/cmake_files/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/FindPLATFORM.cmake @@ -69,7 +69,7 @@ ELSE(WINDOWS) SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) ENDIF(WINDOWS) -SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=4 -DSIZEOF_INT=4) +SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4) # SET(PLATFORM_CPPFLAGS) # # # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT -D_CRT_SECURE_NO_WARNINGS) diff --git a/salome_adm/cmake_files/am2cmake.py b/salome_adm/cmake_files/am2cmake.py index 8e0774b15..8dafe3ee7 100644 --- a/salome_adm/cmake_files/am2cmake.py +++ b/salome_adm/cmake_files/am2cmake.py @@ -1386,6 +1386,13 @@ class CMakeFile(object): SET(var ${var} ${AM_CPPFLAGS}) SET(var ${var} ${AM_CXXFLAGS}) ''') + # -- + newlines.append(r''' + IF(type STREQUAL STATIC) + SET(var ${var} -fPIC) + ENDIF(type STREQUAL STATIC) + ''') + # -- if self.module == "yacs": newlines.append(r''' SET(var ${var} -DYACS_PTHREAD) @@ -1493,9 +1500,15 @@ class CMakeFile(object): STRING(REPLACE ".f" ".c" src ${src}) SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src}) SET(output ${src}) + SET(cmd f2c) + IF(NOT WINDOWS) + IF(CMAKE_SIZEOF_VOID_P STREQUAL 8) + SET(cmd valgrind f2c) # f2c seems to be buggy on 64 bits ... but with valgrind, it works :) + ENDIF() + ENDIF(NOT WINDOWS) ADD_CUSTOM_COMMAND( OUTPUT ${output} - COMMAND f2c ${input} + COMMAND ${cmd} ${input} MAIN_DEPENDENCY ${input} ) ELSE(src STREQUAL trte.f)