From: asl Date: Fri, 3 Nov 2017 08:26:45 +0000 (+0300) Subject: tests configuration for Linux and YAMM X-Git-Tag: v2.1~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f50a01345c4f3761fbe64a838253558d4308931e;p=modules%2Fhydro.git tests configuration for Linux and YAMM --- diff --git a/CMakeLists.txt b/CMakeLists.txt index db56a7c4..f2d38cf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,11 +197,11 @@ MARK_AS_ADVANCED( # Sources # ======== ADD_SUBDIRECTORY (src/shapelib) +ADD_SUBDIRECTORY (src/HYDRO_tests) ADD_SUBDIRECTORY (src/HYDROData) ADD_SUBDIRECTORY (src/HYDROGUI) ADD_SUBDIRECTORY (src/HYDROPy) ADD_SUBDIRECTORY (src/HYDROTools) -ADD_SUBDIRECTORY (src/HYDRO_tests) IF(SALOME_BUILD_DOC) ADD_SUBDIRECTORY(doc) ENDIF() diff --git a/src/HYDRO_tests/CMakeLists.txt b/src/HYDRO_tests/CMakeLists.txt index e446a72c..552c119d 100644 --- a/src/HYDRO_tests/CMakeLists.txt +++ b/src/HYDRO_tests/CMakeLists.txt @@ -3,6 +3,8 @@ ADD_SUBDIRECTORY(reference_data) include(../../CMake/Common.cmake) include(ExternalFiles.cmake) +set (CMAKE_POSITION_INDEPENDENT_CODE ON) + set(PROJECT_HEADERS test_HYDROData_Bathymetry.h test_HYDROData_Channel.h @@ -68,7 +70,7 @@ set(PROJECT_SOURCES TestLib_Runner.cxx ) -add_definitions( -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC -DTEST_MODE ) +add_definitions( -DLIGHT_MODE -DHYDRODATA_STATIC -DHYDROGUI_STATIC -DTEST_MODE -DQT_GUI_LIB -DQT_WIDGETS_LIB ) IF( ${WIN32} ) add_definitions( -DWNT -D__WIN32__ -D__x86__ -D_WIN64 -D_WIN32_WINNT=0x0400 -D__NT__ -D__OSVERSION__=4 ) @@ -87,7 +89,7 @@ IF( ${WIN32} ) ELSE() link_directories( $ENV{CASROOT}/lib $ENV{TBB_ROOT_DIR}/lib/intel64/gcc4.4 ) ENDIF() -SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh ) +SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh gl2ps ) link_directories( $ENV{QT_ROOT_DIR}/lib $ENV{QTDIR}/lib ) IF( ${WIN32} ) @@ -113,7 +115,7 @@ link_directories( $ENV{KERNEL_ROOT_DIR}/lib/salome $ENV{GUI_ROOT_DIR}/lib/salome SET( GUI_LIBRARIES ImageComposer qtx suit CAM OCCViewer GraphicsView ) # Please do not link with LightApp since in the full SALOME it is linked with CORBA (omniORB) -SET( GEOM_LIBRARIES CurveCreator GEOMUtils GEOMUtils ) +SET( GEOM_LIBRARIES CurveCreator GEOMUtils ) link_directories( $ENV{ECWLIB_ROOT_DIR}/lib ) IF( ${WIN32} ) @@ -138,6 +140,7 @@ include_directories( source_group( "External files" FILES ${EXTERNAL_FILES} ) add_executable( HYDROData_tests ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${EXTERNAL_FILES} ${PROJECT_MOC_HEADERS} ) -target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib HYDROData ${ECW_LIBRARIES} ) +set_target_properties( HYDROData_tests PROPERTIES LINK_INTERFACE_LIBRARIES "" ) +target_link_libraries( HYDROData_tests ${GUI_LIBRARIES} ${GEOM_LIBRARIES} ${CAS_LIBRARIES} ${QT_LIBRARIES} ${CPPUNIT_LIBRARIES} shapelib ${ECW_LIBRARIES} ) INSTALL(TARGETS HYDROData_tests EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/HYDRO_tests/ExternalFiles.cmake b/src/HYDRO_tests/ExternalFiles.cmake index f93423ba..8bd6f0ef 100644 --- a/src/HYDRO_tests/ExternalFiles.cmake +++ b/src/HYDRO_tests/ExternalFiles.cmake @@ -1,6 +1,7 @@ find_package( Qt5Core ) find_package( Qt5Widgets ) +set(CMAKE_AUTOMOC ON) set( EXTERNAL_FILES ../HYDROData/HYDROData_AltitudeObject.cxx @@ -95,4 +96,4 @@ set( MOC_HEADERS ../HYDROGUI/HYDROGUI_ViewerDlg.h ) -QT_WRAP_MOC( PROJECT_MOC_HEADERS ${MOC_HEADERS} ) +#QT5_WRAP_MOC( PROJECT_MOC_HEADERS ${MOC_HEADERS} )