From 7a07650dd1f183f5af156c1235cc1d67061813ec Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 12 Aug 2013 09:23:08 +0000 Subject: [PATCH] Merge from V7_2_BR 09/08/2013 --- .../cmake_files/deprecated/FindBOOST.cmake | 11 ++++-- .../cmake_files/deprecated/FindOMNIORB.cmake | 7 +++- .../cmake_files/deprecated/FindPLATFORM.cmake | 5 ++- .../cmake_files/deprecated/FindPYTHON.cmake | 1 + salome_adm/cmake_files/deprecated/am2cmake.py | 5 +++ src/Basics/CMakeLists.txt | 4 ++ src/Container/Container_i.cxx | 3 +- src/KERNEL_PY/salome_test.py | 39 +++++-------------- src/Logger/CMakeLists.txt | 1 + src/SALOMEDSClient/CMakeLists.txt | 2 +- src/SALOMELocalTrace/CMakeLists.txt | 1 + .../Test/SALOMELocalTraceTest.cxx | 6 +-- .../Test/SALOMETraceCollectorTest.cxx | 6 +-- 13 files changed, 49 insertions(+), 42 deletions(-) diff --git a/salome_adm/cmake_files/deprecated/FindBOOST.cmake b/salome_adm/cmake_files/deprecated/FindBOOST.cmake index fff9d21a1..ed0389edd 100644 --- a/salome_adm/cmake_files/deprecated/FindBOOST.cmake +++ b/salome_adm/cmake_files/deprecated/FindBOOST.cmake @@ -26,6 +26,8 @@ MESSAGE(STATUS "Check for boost ...") # ------ +SET (boost_versions 1_35 1_38 1_42 1_46_1 1_49 1_52) + IF(BOOST_IS_MANDATORY STREQUAL 0) SET(BOOST_IS_MANDATORY 0) SET(BOOST_IS_OPTIONAL 1) @@ -75,6 +77,9 @@ ENDIF(BOOST_STATUS) IF(BOOST_STATUS) IF(BOOST_ROOT_USER) SET(BOOST_INCLUDE_PATHS ${BOOST_ROOT_USER} ${BOOST_ROOT_USER}/include) + FOREACH(version ${boost_versions}) + SET(BOOST_INCLUDE_PATHS ${BOOST_INCLUDE_PATHS} ${BOOST_ROOT_USER}/include/boost-${version}) + ENDFOREACH(version ${boost_versions}) ELSE(BOOST_ROOT_USER) SET(BOOST_INCLUDE_PATHS) ENDIF(BOOST_ROOT_USER) @@ -114,7 +119,7 @@ ENDIF(WINDOWS) IF(BOOST_STATUS) SET(BOOST_LIBS) - FOREACH(name thread date_time signals filesystem system regex) + FOREACH(name thread date_time signals filesystem system regex chrono) IF(WINDOWS) IF(CMAKE_BUILD_TYPE STREQUAL Debug) SET(EXTENSION -gd) @@ -123,10 +128,10 @@ IF(BOOST_STATUS) ENDIF(CMAKE_BUILD_TYPE STREQUAL Debug) SET(LIB_NAMES) SET(STATIC_LIB_NAMES) - FOREACH(version 1_35 1_38 1_42 1_46_1 1_49) + FOREACH(version ${boost_versions}) SET(LIB_NAMES ${LIB_NAMES} boost_${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 1_49) + ENDFOREACH(version ${boost_versions}) 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}) diff --git a/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake b/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake index 64599d1bf..f14adaee7 100644 --- a/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake +++ b/salome_adm/cmake_files/deprecated/FindOMNIORB.cmake @@ -65,8 +65,13 @@ ENDIF(OMNIORB_STATUS) IF(OMNIORB_STATUS) SET(OMNIIDL_EXECUTABLE_TO_FIND omniidl) + IF(WINDOWS) + SET( FIND_PATH ${OMNIORB_ROOT_USER}/bin/x86_win32) + ELSE(WINDOWS) + SET( FIND_PATH ${OMNIORB_ROOT_USER}/bin) + ENDIF(WINDOWS) IF(OMNIORB_ROOT_USER) - FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${OMNIORB_ROOT_USER}/bin) + FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND} PATHS ${FIND_PATH} ) ELSE(OMNIORB_ROOT_USER) FIND_PROGRAM(OMNIIDL_EXECUTABLE ${OMNIIDL_EXECUTABLE_TO_FIND}) ENDIF(OMNIORB_ROOT_USER) diff --git a/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake b/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake index d7dcd0033..7b8698111 100644 --- a/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake +++ b/salome_adm/cmake_files/deprecated/FindPLATFORM.cmake @@ -108,7 +108,10 @@ IF(WINDOWS) SET(PLATFORM_LIBS ${PLATFORM_LIBS} Userenv.lib) # At least for GEOM suit IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") # if platform is Windows 64 bit - SET(PLATFORM_CPPFLAGS "${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators # to be removed + # To avoid runtime error during checking iterators # to be removed + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL_THROWS=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_HAS_ITERATOR_DEBUGGING=0) SET(PLATFORM_DEFINITIONS "${PLATFORM_DEFINITIONS} -D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0 -D_HAS_ITERATOR_DEBUGGING=0") # To avoid runtime error during checking iterators ENDIF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") ELSE(WINDOWS) diff --git a/salome_adm/cmake_files/deprecated/FindPYTHON.cmake b/salome_adm/cmake_files/deprecated/FindPYTHON.cmake index 1b2f64aae..cf7b93211 100644 --- a/salome_adm/cmake_files/deprecated/FindPYTHON.cmake +++ b/salome_adm/cmake_files/deprecated/FindPYTHON.cmake @@ -190,6 +190,7 @@ IF(PYTHON_STATUS) IF(PYTHON_LIB) SET(PYTHON_LIBS ${PYTHON_LIBS} ${PYTHON_LIB}) MESSAGE(STATUS "python lib found: ${PYTHON_LIB}") + SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${PYTHON_LIB_PATHS}) ELSE(PYTHON_LIB) SET(PYTHON_STATUS 0) IF(PYTHON_ROOT_USER) diff --git a/salome_adm/cmake_files/deprecated/am2cmake.py b/salome_adm/cmake_files/deprecated/am2cmake.py index a03ad23c5..fac70cb18 100644 --- a/salome_adm/cmake_files/deprecated/am2cmake.py +++ b/salome_adm/cmake_files/deprecated/am2cmake.py @@ -594,6 +594,7 @@ class CMakeFile(object): newlines.append(""" SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR}) SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR}) + INCLUDE(${GUI_ROOT_DIR}/adm_local/cmake_files/deprecated/FindQWT.cmake) INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake) INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMEDFILE.cmake) INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake) @@ -660,6 +661,10 @@ class CMakeFile(object): INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindEXPAT.cmake) INCLUDE(${CMAKE_SOURCE_DIR}/adm/cmake/FindGRAPHVIZ.cmake) INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/FindSPHINX.cmake) + + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_SECURE_SCL_THROWS=0) + SET(PLATFORM_CPPFLAGS ${PLATFORM_CPPFLAGS} -D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators """) pass if self.module == "jobmanager": diff --git a/src/Basics/CMakeLists.txt b/src/Basics/CMakeLists.txt index becf90fa7..6a32248cc 100755 --- a/src/Basics/CMakeLists.txt +++ b/src/Basics/CMakeLists.txt @@ -17,6 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +INCLUDE_DIRECTORIES( + ${PTHREAD_INCLUDE_DIRS} +) + SET(SALOMEBasics_SOURCES BasicsGenericDestructor.cxx Basics_Utils.cxx diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 106f8485c..c2fb5febf 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -1365,7 +1365,8 @@ void ActSigIntHandler() #else signal( SIGINT, SigIntHandler ); - signal( SIGUSR1, SigIntHandler ); +// legacy code required to supervisor. Commented in order to avoid problems on Windows +// signal( SIGUSR1, SigIntHandler ); #endif } diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index 9b799e5a4..5bac523fe 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -22,7 +22,7 @@ # print -print "Perform quick test of the application by loading of the GEOM, SMESH, VISU, MED" +print "Perform quick test of the application by loading of the GEOM, SMESH, MED, PARAVIS" print "components and doing some operation within the components." print @@ -63,33 +63,14 @@ print "======================================================================" print " %d. Check modules availability in the module catalog " % step; step+=1 print "======================================================================" -print -print "--- Check GEOM ..." -comp = catalog.GetComponent("GEOM") -if not comp: - raise RuntimeError, "Component GEOM is not found in Module Catalog." -print "OK" - -print -print "--- Check SMESH ..." -comp = catalog.GetComponent("SMESH") -if not comp: - raise RuntimeError, "Component SMESH is not found in Module Catalog." -print "OK" - -print -print "--- Check MED ..." -comp = catalog.GetComponent("MEDOPFactory") -if not comp: - raise RuntimeError, "Component MED is not found in Module Catalog." -print "OK" - -print -print "--- Check PARAVIS ..." -comp = catalog.GetComponent("PARAVIS") -if not comp: - raise RuntimeError, "Component PARAVIS is not found in Module Catalog." -print "OK" +for module in [ "GEOM", "SMESH", "MEDOPFactory", "PARAVIS"]: + print + print "--- Check %s ..." % module + comp = catalog.GetComponent(module) + if not comp: + raise RuntimeError, "Component %s is not found in Module Catalog." % module + print "OK" + pass print @@ -469,4 +450,4 @@ else: # not in gui mode, Paravis can not be tested # ---- update object browser if salome.hasDesktop(): - salome.sg.updateObjBrowser(1); \ No newline at end of file + salome.sg.updateObjBrowser(1); diff --git a/src/Logger/CMakeLists.txt b/src/Logger/CMakeLists.txt index c07c0e66c..fdbae1565 100755 --- a/src/Logger/CMakeLists.txt +++ b/src/Logger/CMakeLists.txt @@ -19,6 +19,7 @@ INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} + ${PTHREAD_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/salome_adm ${CMAKE_CURRENT_SOURCE_DIR}/../Basics ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace diff --git a/src/SALOMEDSClient/CMakeLists.txt b/src/SALOMEDSClient/CMakeLists.txt index a94632f16..9e4ea8ab1 100755 --- a/src/SALOMEDSClient/CMakeLists.txt +++ b/src/SALOMEDSClient/CMakeLists.txt @@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) ADD_LIBRARY(SalomeDSClient SALOMEDSClient_ClientFactory.cxx) -TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel) +TARGET_LINK_LIBRARIES(SalomeDSClient SalomeIDLKernel ${PLATFORM_LIBS}) INSTALL(TARGETS SalomeDSClient EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") diff --git a/src/SALOMELocalTrace/CMakeLists.txt b/src/SALOMELocalTrace/CMakeLists.txt index 3da322c7f..00af50a84 100755 --- a/src/SALOMELocalTrace/CMakeLists.txt +++ b/src/SALOMELocalTrace/CMakeLists.txt @@ -20,6 +20,7 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../Basics + ${PTHREAD_INCLUDE_DIRS} ) SET(COMMON_HEADERS diff --git a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx index 094f65d42..b68f011ef 100644 --- a/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx +++ b/src/SALOMELocalTrace/Test/SALOMELocalTraceTest.cxx @@ -190,7 +190,7 @@ void *PrintHello(void *threadid) << " - iter " << i); #endif pthread_exit(NULL); - #ifdef WIN32 - return NULL; - #endif +#ifdef WIN32 + return NULL; +#endif } diff --git a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx index 3c9758f02..14f49717f 100644 --- a/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx +++ b/src/SALOMETraceCollector/Test/SALOMETraceCollectorTest.cxx @@ -113,7 +113,7 @@ void *PrintHello(void *threadid) << " - iter " << i); #endif pthread_exit(NULL); - #ifdef WIN32 - return NULL; - #endif +#ifdef WIN32 + return NULL; +#endif } -- 2.39.2