+++ /dev/null
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# 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.
-#
-# 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
-#
-
-# ------
-
-MESSAGE(STATUS "Check for libxml2 ...")
-
-# ------
-
-IF(LIBXML2_IS_MANDATORY STREQUAL 0)
- SET(LIBXML2_IS_MANDATORY 0)
- SET(LIBXML2_IS_OPTIONAL 1)
-ENDIF(LIBXML2_IS_MANDATORY STREQUAL 0)
-IF(LIBXML2_IS_OPTIONAL STREQUAL 0)
- SET(LIBXML2_IS_MANDATORY 1)
- SET(LIBXML2_IS_OPTIONAL 0)
-ENDIF(LIBXML2_IS_OPTIONAL STREQUAL 0)
-IF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL)
- SET(LIBXML2_IS_MANDATORY 1)
- SET(LIBXML2_IS_OPTIONAL 0)
-ENDIF(NOT LIBXML2_IS_MANDATORY AND NOT LIBXML2_IS_OPTIONAL)
-
-# ------
-
-SET(LIBXML2_STATUS 1)
-IF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0)
- SET(LIBXML2_STATUS 0)
- MESSAGE(STATUS "libxml2 disabled from command line.")
-ENDIF(WITHOUT_LIBXML2 OR WITH_LIBXML2 STREQUAL 0)
-
-# ------
-
-IF(LIBXML2_STATUS)
- IF(WITH_LIBXML2)
- SET(LIBXML2_ROOT_USER ${WITH_LIBXML2})
- ELSE(WITH_LIBXML2)
- SET(LIBXML2_ROOT_USER $ENV{LIBXML2_ROOT})
- IF(NOT LIBXML2_ROOT_USER)
- SET(LIBXML2_ROOT_USER $ENV{LIBXML_DIR})
- ENDIF(NOT LIBXML2_ROOT_USER)
- ENDIF(WITH_LIBXML2)
-ENDIF(LIBXML2_STATUS)
-
-# -----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- SET(LIBXML2_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_FIND_PATHS_OPTION)
- ENDIF(LIBXML2_ROOT_USER)
-ENDIF(LIBXML2_STATUS)
-
-# -----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- IF(WINDOWS)
- SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include)
- ELSE(WINDOWS)
- SET(LIBXML2_INCLUDE_PATHS ${LIBXML2_ROOT_USER}/include/libxml2)
- ENDIF(WINDOWS)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_INCLUDE_PATHS /usr/include/libxml2)
- ENDIF(LIBXML2_ROOT_USER)
- SET(LIBXML2_INCLUDE_TO_FIND libxml/parser.h)
- FIND_PATH(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_TO_FIND} PATHS ${LIBXML2_INCLUDE_PATHS} ${LIBXML2_FIND_PATHS_OPTION})
- IF(LIBXML2_INCLUDE_DIR)
- SET(LIBXML2_INCLUDES -I${LIBXML2_INCLUDE_DIR})# to remove
- SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} found in ${LIBXML2_INCLUDE_DIR}")
- ELSE(LIBXML2_INCLUDE_DIR)
- SET(LIBXML2_STATUS 0)
- IF(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found in ${LIBXML2_INCLUDE_PATHS}, check your LIBXML2 installation.")
- ELSE(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "${LIBXML2_INCLUDE_TO_FIND} not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.")
- ENDIF(LIBXML2_ROOT_USER)
- ENDIF(LIBXML2_INCLUDE_DIR)
-ENDIF(LIBXML2_STATUS)
-
-# ----
-
-IF(LIBXML2_STATUS)
- IF(LIBXML2_ROOT_USER)
- SET(LIBXML2_LIB_PATHS ${LIBXML2_ROOT_USER}/lib)
- ELSE(LIBXML2_ROOT_USER)
- SET(LIBXML2_LIB_PATHS)
- ENDIF(LIBXML2_ROOT_USER)
-ENDIF(LIBXML2_STATUS)
-
-IF(LIBXML2_STATUS)
- IF(WINDOWS)
- FIND_LIBRARY(LIBXML2_LIB libxml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION})
- ELSE(WINDOWS)
- FIND_LIBRARY(LIBXML2_LIB xml2 PATHS ${LIBXML2_LIB_PATHS} ${LIBXML2_FIND_PATHS_OPTION})
- ENDIF(WINDOWS)
- SET(LIBXML2_LIBS)
- IF(LIBXML2_LIB)
- SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${LIBXML2_LIB})
- MESSAGE(STATUS "libxml2 lib found: ${LIBXML2_LIB}")
- ELSE(LIBXML2_LIB)
- SET(LIBXML2_STATUS 0)
- IF(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "libxml2 lib not found in ${LIBXML2_LIB_PATHS}, check your LIBXML2 installation.")
- ELSE(LIBXML2_ROOT_USER)
- MESSAGE(STATUS "libxml2 lib not found on system, try to use WITH_LIBXML2 option or LIBXML2_ROOT environment variable.")
- ENDIF(LIBXML2_ROOT_USER)
- ENDIF(LIBXML2_LIB)
-ENDIF(LIBXML2_STATUS)
-
-# ----
-
-IF(WINDOWS)
- SET(ICONV_ROOT $ENV{ICONV_ROOT})
- IF(ICONV_ROOT)
- FIND_PATH(ICONV_INCLUDE_DIR iconv.h ${ICONV_ROOT}/include)
- FIND_LIBRARY(ICONV_LIBS iconv ${ICONV_ROOT}/lib)
- SET(LIBXML2_INCLUDES ${LIBXML2_INCLUDES} -I${ICONV_INCLUDE_DIR})# to remove
- SET(LIBXML_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS} ${ICONV_INCLUDE_DIR})
- SET(LIBXML2_LIBS ${LIBXML2_LIBS} ${ICONV_LIBS})
- ENDIF(ICONV_ROOT)
-ENDIF(WINDOWS)
-
-# ------
-IF(LIBXML2_STATUS)
- SET(LIBXML_INCLUDES ${LIBXML2_INCLUDES})# to remove
- SET(LIBXML_CPPFLAGS ${LIBXML2_INCLUDES})
- SET(LIBXML_DEFINITIONS)
- SET(LIBXML_LIBS ${LIBXML2_LIBS})
-ELSE(LIBXML2_STATUS)
- IF(LIBXML2_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "libxml2 not found ... mandatory ... abort")
- ELSE(LIBXML2_IS_MANDATORY)
- MESSAGE(STATUS "libxml2 not found ... optional ... disabled")
- ENDIF(LIBXML2_IS_MANDATORY)
-ENDIF(LIBXML2_STATUS)
-
-# ------
FIND_PATH(MEDFILE_INCLUDE_DIRS med.h)
#FIND_PROGRAM(MDUMP mdump)
-FIND_LIBRARY(MEDFILE_C_LIBRARIES libmedC.so medC)
-FIND_LIBRARY(MEDFILE_F_LIBRARIES libmed.so med)
+FIND_LIBRARY(MEDFILE_C_LIBRARIES NAMES libmedC.so medC)
+FIND_LIBRARY(MEDFILE_F_LIBRARIES NAMES libmed.so med)
IF(MEDFILE_F_LIBRARIES)
SET(MEDFILE_LIBRARIES ${MEDFILE_C_LIBRARIES} ${MEDFILE_F_LIBRARIES})
ELSE(MEDFILE_F_LIBRARIES)
+++ /dev/null
-# Copyright (C) 2007-2013 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.
-#
-# 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
-#
-
-MARK_AS_ADVANCED(ISSUE)
-FIND_FILE(ISSUE issue /etc)
-IF(ISSUE)
- SET(WINDOWS 0)
-ELSE()
- SET(WINDOWS 1)
-ENDIF(ISSUE)
-
-IF(WINDOWS)
- SET(MACHINE WINDOWS)
-ELSE(WINDOWS)
- SET(MACHINE PCLINUX)
-ENDIF(WINDOWS)
-
-SET(CMAKE_INSTALL_PREFIX_ENV $ENV{CMAKE_INSTALL_PREFIX})
-IF(CMAKE_INSTALL_PREFIX_ENV)
- SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX_ENV} CACHE PATH "installation prefix" FORCE)
-ENDIF(CMAKE_INSTALL_PREFIX_ENV)
-
-IF(NOT CMAKE_BUILD_TYPE)
- SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
-ENDIF(NOT CMAKE_BUILD_TYPE)
-
-IF(NOT CMAKE_BUILD_TYPE)
- SET(CMAKE_BUILD_TYPE Release)
-ENDIF(NOT CMAKE_BUILD_TYPE)
-
-IF(WINDOWS)
-ELSE(WINDOWS)
- SET(ADD_WERROR ON)
- SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
- FOREACH(name ${NAMES})
- SET(VAL $ENV{${name}})
- IF(X${VAL} STREQUAL X0)
- SET(ADD_WERROR ON)
- ENDIF(X${VAL} STREQUAL X0)
- IF(X${VAL} STREQUAL X1)
- SET(ADD_WERROR OFF)
- ENDIF(X${VAL} STREQUAL X1)
- ENDFOREACH(name ${NAMES})
-# IF(ADD_WERROR)
-# SET(CMAKE_C_FLAGS "-Werror")
-# SET(CMAKE_CXX_FLAGS "-Werror")
-# ENDIF(ADD_WERROR)
-ENDIF(WINDOWS)
-
-IF(CMAKE_BUILD_TYPE)
- IF(WINDOWS)
- MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
- SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
- ELSE(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- SET(CMAKE_C_FLAGS_DEBUG "-g")
- SET(CMAKE_CXX_FLAGS_DEBUG "-g")
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG")
- SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG")
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ENDIF(WINDOWS)
-ENDIF(CMAKE_BUILD_TYPE)
-
-SET(PLATFORM_CPPFLAGS) # to be removed
-SET(PLATFORM_LDFLAGS) # to be removed
-SET(PLATFORM_LIBADD) # to be removed
-
-SET(PLATFORM_LIBS)
-SET(PLATFORM_DEFINITIONS)
-
-IF(WINDOWS)
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} /W0) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ... # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DWNT) # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -DPPRO_NT) # For medfile # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_USE_MATH_DEFINES) # At least for MEDMEM # to be removed
- SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Ws2_32.lib) # to be removed
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} Userenv.lib) # At least for GEOM suit # to be removed
-
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} /W0")
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_CRT_SECURE_NO_WARNINGS") # To disable windows warnings for strcpy, fopen, ...
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SCL_SECURE_NO_WARNINGS") # To disable windows warnings std::copy, std::transform, ...
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DWNT")
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -DPPRO_NT") # For medfile
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_USE_MATH_DEFINES") # At least for MEDMEM
- SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_WIN32_WINNT=0x0500") # Windows 2000 or later API is required
-
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} Ws2_32.lib)
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit
-
-ELSE(WINDOWS)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wparentheses)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wreturn-type)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wmissing-declarations)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wunused)
- # SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -Wall)
- SET(PLATFORM_LIBADD ${PLATFORM_LIBADD} -ldl) # to be removed
- SET(PLATFORM_LIBS ${PLATFORM_LIBS} -ldl)
-ENDIF(WINDOWS)
-
-SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -DSIZEOF_FORTRAN_INTEGER=4 -DSIZEOF_LONG=${CMAKE_SIZEOF_VOID_P} -DSIZEOF_INT=4") # to be removed
-SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -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)
-#ELSE(WINDOWS)
-# # SET(RM /bin/rm)
-#ENDIF(WINDOWS)
-
-### SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_DEBUG_)
-
-##SET(RCP rcp)
-##SET(RSH rsh)
-##SET(RCP rcp)
-
-## MESSAGE(FATAL_ERROR "ZZZZZZZ")
+++ /dev/null
-# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# 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.
-#
-# 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
-#
-
-# ------
-
-MESSAGE(STATUS "Check for pthreads ...")
-
-# ------
-
-IF(PTHREADS_IS_MANDATORY STREQUAL 0)
- SET(PTHREADS_IS_MANDATORY 0)
- SET(PTHREADS_IS_OPTIONAL 1)
-ENDIF(PTHREADS_IS_MANDATORY STREQUAL 0)
-IF(PTHREADS_IS_OPTIONAL STREQUAL 0)
- SET(PTHREADS_IS_MANDATORY 1)
- SET(PTHREADS_IS_OPTIONAL 0)
-ENDIF(PTHREADS_IS_OPTIONAL STREQUAL 0)
-IF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL)
- SET(PTHREADS_IS_MANDATORY 1)
- SET(PTHREADS_IS_OPTIONAL 0)
-ENDIF(NOT PTHREADS_IS_MANDATORY AND NOT PTHREADS_IS_OPTIONAL)
-
-# ------
-
-SET(PTHREADS_STATUS 1)
-IF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0)
- SET(PTHREADS_STATUS 0)
- MESSAGE(STATUS "pthreads disabled from command line.")
-ENDIF(WITHOUT_PTHREADS OR WITH_PTHREADS STREQUAL 0)
-
-# ------
-
-IF(PTHREADS_STATUS)
- IF(WITH_PTHREADS)
- SET(PTHREADS_ROOT_USER ${WITH_PTHREADS})
- ELSE(WITH_PTHREADS)
- SET(PTHREADS_ROOT_USER $ENV{PTHREADS_ROOT})
- ENDIF(WITH_PTHREADS)
-ENDIF(PTHREADS_STATUS)
-
-# -----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_FIND_PATHS_OPTION NO_DEFAULT_PATH)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_FIND_PATHS_OPTION)
- ENDIF(PTHREADS_ROOT_USER)
-ENDIF(PTHREADS_STATUS)
-
-# -----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_PATHS ${PTHREADS_ROOT_USER}/include)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_PATHS)
- ENDIF(PTHREADS_ROOT_USER)
- SET(PTHREADS_INCLUDE_TO_FIND pthread.h)
- FIND_PATH(PTHREADS_INCLUDE_DIR ${PTHREADS_INCLUDE_TO_FIND} PATHS ${PTHREADS_INCLUDE_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- IF(PTHREADS_INCLUDE_DIR)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREAD_CFLAGS -I${PTHREADS_INCLUDE_DIR}) # to remove
- SET(PTHREAD_INCLUDE_DIRS ${PTHREADS_INCLUDE_DIR})
- ENDIF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} found in ${PTHREADS_INCLUDE_DIR}")
- ELSE(PTHREADS_INCLUDE_DIR)
- SET(PTHREADS_STATUS 0)
- IF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found in ${PTHREADS_INCLUDE_PATHS}, check your PTHREADS installation.")
- ELSE(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "${PTHREADS_INCLUDE_TO_FIND} not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.")
- ENDIF(PTHREADS_ROOT_USER)
- ENDIF(PTHREADS_INCLUDE_DIR)
-ENDIF(PTHREADS_STATUS)
-
-# ----
-
-IF(PTHREADS_STATUS)
- IF(PTHREADS_ROOT_USER)
- SET(PTHREADS_LIB_PATHS ${PTHREADS_ROOT_USER}/lib)
- ELSE(PTHREADS_ROOT_USER)
- SET(PTHREADS_LIB_PATHS)
- ENDIF(PTHREADS_ROOT_USER)
-ENDIF(PTHREADS_STATUS)
-
-IF(PTHREADS_STATUS)
- IF(WINDOWS)
- IF(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PTHREAD_LIB pthreadVSE2 pthreadVC2 PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ELSE(CMAKE_BUILD_TYPE STREQUAL Release)
- FIND_LIBRARY(PTHREAD_LIB pthreadVSE2d pthreadVC2d PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
- ELSE(WINDOWS)
- FIND_LIBRARY(PTHREAD_LIB pthread PATHS ${PTHREADS_LIB_PATHS} ${PTHREADS_FIND_PATHS_OPTION})
- ENDIF(WINDOWS)
- SET(PTHREAD_LIBS)
- IF(PTHREAD_LIB)
- SET(PTHREAD_LIBS ${PTHREAD_LIBS} ${PTHREAD_LIB})
- MESSAGE(STATUS "pthread lib found: ${PTHREAD_LIB}")
- ELSE(PTHREAD_LIB)
- SET(PTHREADS_STATUS 0)
- IF(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "pthread lib not found in ${PTHREADS_LIB_PATHS}, check your PTHREADS installation.")
- ELSE(PTHREADS_ROOT_USER)
- MESSAGE(STATUS "pthread lib not found on system, try to use WITH_PTHREADS option or PTHREADS_ROOT environment variable.")
- ENDIF(PTHREADS_ROOT_USER)
- ENDIF(PTHREAD_LIB)
-ENDIF(PTHREADS_STATUS)
-
-# ----
-
-IF(PTHREADS_STATUS)
-ELSE(PTHREADS_STATUS)
- IF(PTHREADS_IS_MANDATORY)
- MESSAGE(FATAL_ERROR "pthreads not found ... mandatory ... abort")
- ELSE(PTHREADS_IS_MANDATORY)
- MESSAGE(STATUS "pthreads not found ... optional ... disabled")
- ENDIF(PTHREADS_IS_MANDATORY)
-ENDIF(PTHREADS_STATUS)
# MPI root directory used for HDF5 compilation is exposed into MPI_ROOT_DIR_EXP
#
+if(WINDOWS)
+ set(PREV_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+ set(CMAKE_FIND_LIBRARY_SUFFIXES dll${CMAKE_IMPORT_LIBRARY_SUFFIX})
+endif(WINDOWS)
+
SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(HDF5 HDF5_INCLUDE_DIR 1)
MARK_AS_ADVANCED(FORCE HDF5_INCLUDE_DIR HDF5_LIB HDF5_DIR)
IF(HDF5_IS_PARALLEL AND NOT SALOME_USE_MPI)
MESSAGE(FATAL_ERROR "HDF5 is compiled with MPI, you have to set SALOME_USE_MPI to ON")
ENDIF()
+
+if(WINDOWS)
+ set(CMAKE_FIND_LIBRARY_SUFFIXES ${PREV_CMAKE_FIND_LIBRARY_SUFFIXES})
+endif(WINDOWS)
SET(PYTHON_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to Python directory (interpreter and libs)")
# 2. Find package - config mode first (i.e. looking for XYZ-config.cmake)
+IF(WINDOWS)
+ IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ SET(PythonInterp_FIND_VERSION _d)
+ SET(PYTHON_DEFINITIONS "-DHAVE_DEBUG_PYTHON")
+ ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ENDIF(WINDOWS)
IF(EXISTS "${PYTHON_ROOT_DIR}")
# Hope to find direclty a CMake config file there
SET(_CONF_DIR "${PYTHON_ROOT_DIR}/share/cmake")
--- /dev/null
+# Copyright (C) 2007-2013 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.
+#
+# 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
+#
+
+## Detect architecture
+IF(WIN32)
+ SET(MACHINE WINDOWS)
+ELSE()
+ SET(MACHINE PCLINUX)
+ENDIF()
+
+## Test for 64 bits
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(MACHINE_IS_64 TRUE)
+ELSE()
+ SET(MACHINE_IS_64 FALSE)
+ENDIF()
+
+## Force CMAKE_BUILD_TYPE to Release if not set
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE $ENV{CMAKE_BUILD_TYPE})
+ENDIF(NOT CMAKE_BUILD_TYPE)
+IF(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE Release)
+ENDIF(NOT CMAKE_BUILD_TYPE)
+
+## Define the log level according to the build type
+IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "Debug")
+ SET(PYLOGLEVEL DEBUG)
+ELSE()
+ SET(PYLOGLEVEL WARNING)
+ENDIF()
+
+## Make all warnings errors on non-windows platforms
+# CURRENTLY DISABLED
+IF(NOT (WIN32 OR APPLE))
+ SET(ADD_WERROR ON)
+ SET(NAMES ACCEPT_SALOME_WARNINGS ACCEPT_${MODULE}_WARNINGS I_AM_A_TROLL_I_DO_NOT_FIX_${MODULE}_WARNINGS)
+ FOREACH(name ${NAMES})
+ SET(VAL $ENV{${name}})
+ IF("${VAL}" STREQUAL "0")
+ SET(ADD_WERROR ON)
+ ENDIF()
+ IF("${VAL}" STREQUAL "1")
+ SET(ADD_WERROR OFF)
+ ENDIF()
+ ENDFOREACH()
+
+ IF(ADD_WERROR)
+# SET(CMAKE_C_FLAGS "-Werror")
+# SET(CMAKE_CXX_FLAGS "-Werror")
+ ENDIF()
+ENDIF()
+
+## TODO: remove this ?
+#IF(WIN32)
+# MARK_AS_ADVANCED(CLEAR CMAKE_CONFIGURATION_TYPES)
+# SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE} CACHE STRING "compilation types" FORCE)
+#ELSE()
+# IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+# SET(CMAKE_C_FLAGS_DEBUG "-g")
+# SET(CMAKE_CXX_FLAGS_DEBUG "-g")
+# ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug)
+# IF(CMAKE_BUILD_TYPE STREQUAL Release)
+# SET(CMAKE_C_FLAGS_RELEASE "-O1 -DNDEBUG")
+# SET(CMAKE_CXX_FLAGS_RELEASE "-O1 -DNDEBUG")
+# ENDIF(CMAKE_BUILD_TYPE STREQUAL Release)
+#ENDIF()
+
+
+IF(WIN32)
+ ## Windows specific:
+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) # To disable windows warnings for strcpy, fopen, ...
+ ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS) # To disable windows warnings std::copy, std::transform, ...
+ ADD_DEFINITIONS(-DWNT -DWIN32)
+ ADD_DEFINITIONS(-D_WIN32_WINNT=0x0500) # Windows 2000 or later API is required
+ ADD_DEFINITIONS(-DPPRO_NT) # For medfile
+ #ADD_DEFINITIONS(-D_USE_MATH_DEFINES) # for MEDMEM
+
+ SET(PLATFORM_LIBS Ws2_32.lib)
+ LIST(APPEND PLATFORM_LIBS Userenv.lib) # At least for GEOM suit
+
+ IF(MACHINE_IS_64)
+ ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+ ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
+ SET(SIZE_OF_LONG "4") # set sizeof(long) to 4 byte
+ ENDIF()
+ELSE()
+ ## Linux specific:
+ SET(PLATFORM_LIBS dl) # Dynamic loading (dlopen, dlsym)
+ENDIF()
+
+## define _DEBUG_ macro
+IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+ ADD_DEFINITIONS(-D_DEBUG_)
+ENDIF()
+
+## Apple specific:
+IF(APPLE)
+ SET(CMAKE_C_COMPILER gcc)
+ SET(CMAKE_CXX_COMPILER g++)
+ # because default is clang(llvm) with mountain lion at least
+ENDIF()