From 7757c27cd83572b1032fda8315136097b15cc25e Mon Sep 17 00:00:00 2001 From: bruneton Date: Mon, 21 Oct 2013 09:57:37 +0000 Subject: [PATCH] CMake: porting module to the new CMake procedure. Isolated as much as possible IDL wrapping logic. Introduced flag SALOME_PARAVIS_MINIMAL_CORBA to turn the wrapping off. --- src/ParaView/readme.txt | 3 - src/VTKParser/CMakeLists.txt | 113 ------------------ .../GenerateWrapList.cmake | 0 src/{ => VTKWrapping}/ParaView/lex.yy.c | 0 src/{ => VTKWrapping}/ParaView/vtkParse.tab.c | 0 src/{ => VTKWrapping}/ParaView/vtkParseData.c | 0 src/{ => VTKWrapping}/ParaView/vtkParseData.h | 0 .../ParaView/vtkParseExtras.c | 0 .../ParaView/vtkParseExtras.h | 0 .../ParaView/vtkParseHierarchy.c | 0 .../ParaView/vtkParseHierarchy.h | 0 .../ParaView/vtkParseInternal.h | 0 src/{ => VTKWrapping}/ParaView/vtkParseMain.c | 0 src/{ => VTKWrapping}/ParaView/vtkParseMain.h | 0 .../ParaView/vtkParsePreprocess.c | 0 .../ParaView/vtkParsePreprocess.h | 0 .../ParaView/vtkParseString.c | 0 .../ParaView/vtkParseString.h | 0 src/{ => VTKWrapping}/ParaView/vtkWrap.c | 0 src/{ => VTKWrapping}/ParaView/vtkWrap.h | 0 .../ParaView/vtkWrapHierarchy.c | 0 src/{ => VTKWrapping}/ParaView/vtkWrapText.c | 0 src/{ => VTKWrapping}/ParaView/vtkWrapText.h | 0 .../create_class.py | 0 .../create_class.sh | 0 .../getwrapclasses.py | 0 src/{VTKParser => VTKWrapping}/readme.txt | 0 src/{VTKParser => VTKWrapping}/wrap.cmake | 0 28 files changed, 116 deletions(-) delete mode 100644 src/ParaView/readme.txt delete mode 100644 src/VTKParser/CMakeLists.txt rename src/{VTKParser => VTKWrapping}/GenerateWrapList.cmake (100%) rename src/{ => VTKWrapping}/ParaView/lex.yy.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParse.tab.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseData.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseData.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseExtras.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseExtras.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseHierarchy.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseHierarchy.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseInternal.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseMain.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseMain.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParsePreprocess.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParsePreprocess.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseString.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkParseString.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkWrap.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkWrap.h (100%) rename src/{ => VTKWrapping}/ParaView/vtkWrapHierarchy.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkWrapText.c (100%) rename src/{ => VTKWrapping}/ParaView/vtkWrapText.h (100%) rename src/{VTKParser => VTKWrapping}/create_class.py (100%) rename src/{VTKParser => VTKWrapping}/create_class.sh (100%) rename src/{VTKParser => VTKWrapping}/getwrapclasses.py (100%) rename src/{VTKParser => VTKWrapping}/readme.txt (100%) rename src/{VTKParser => VTKWrapping}/wrap.cmake (100%) diff --git a/src/ParaView/readme.txt b/src/ParaView/readme.txt deleted file mode 100644 index 40939f71..00000000 --- a/src/ParaView/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -These files are pure copy from Paraview sources. -They need for extractor building. -Them has to be updated if the corresponded files in paraview will be changed \ No newline at end of file diff --git a/src/VTKParser/CMakeLists.txt b/src/VTKParser/CMakeLists.txt deleted file mode 100644 index ca407da1..00000000 --- a/src/VTKParser/CMakeLists.txt +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright (C) 2010-2013 CEA/DEN, EDF R&D -# -# 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 -# - - -## Generation of the list of VTK classes (to be wrapped into IDLs) -## ===================================== -IF(NOT SALOME_LIGHT_ONLY) - # TODO: the below requires ParaView in the PYTHONPATH ... not so nice: - MESSAGE(STATUS "Generating list of wrapped VTK classes ...") - LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0) - EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/getwrapclasses.py ${PARAVIEW_INCLUDE_DIR0} - RESULT_VARIABLE _res) - IF(NOT _res EQUAL 0) - MESSAGE(FATAL_ERROR "Unable to run the Python script retrieving the list of VTK classes.") - ENDIF() -ENDIF() - -INCLUDE(GenerateWrapList.cmake) - -## Parser for VTK header files -## =========================== -## -## Everything under the ParaView subdirectory is a pure copy of ParaView source -## code. - -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_SOURCE_DIR}/ParaView - ${PROJECT_BINARY_DIR}/idl - ${PROJECT_SOURCE_DIR}/src/PVGUI - ) - -# Wrapper executable generating the headers, source files and IDL files -# corresponding to VTK wrapping: -SET(_wrap_PROGRAMS - vtkWrapIDL_HH - vtkWrapIDL_CC - vtkWrapIDL - ) - -SET(vtkWrapIDL_HH_CPPFLAGS -DIDL_I_HH) -SET(vtkWrapIDL_CC_CPPFLAGS -DIDL_I_CC) -SET(vtkWrapIDL_CPPFLAGS) - -#VTN TODO: vtkParseData supports two types of structures for wrapping. -#We use old structures currently, but is is not influent for results of wrapping. -#It may be necessary to port vtkWrapIDL to new approach in future. -#IF(VTK_LEGACY_REMOVE) -# ADD_DEFINITIONS(-DVTK_PARSE_LEGACY_REMOVE) -#ENDIF() - -FOREACH(name ${_wrap_PROGRAMS}) - ADD_EXECUTABLE(${name} - ParaView/vtkParse.tab.c - ParaView/vtkParsePreprocess.c - ParaView/vtkParseHierarchy.c - ParaView/vtkParseExtras.c - ParaView/vtkParseMain.c - ParaView/vtkParseData.c - ParaView/vtkParseString.c - ParaView/vtkWrap.c -# ParaView/vtkWrapText.c - ${PROJECT_SOURCE_DIR}/idl/vtkWrapIDL.c) - ADD_DEPENDENCIES(${name} generate_txt) - - set_property(SOURCE ParaView/vtkParseMain.c PROPERTY COMPILE_DEFINITIONS - VTK_PARSE_VERSION="${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}") - - SET(flags) - FOREACH(f ${PARAVIEW_INCLUDES} ${VTK_INCLUDES} ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${${name}_CPPFLAGS}) - SET(flags "${flags} ${f}") - ENDFOREACH(f ${PARAVIEW_INCLUDES} ${VTK_INCLUDES} ${PLATFORM_CPPFLAGS} ${PTHREAD_CFLAGS} ${${name}_CPPFLAGS}) - - SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS "${flags}") - TARGET_LINK_LIBRARIES(${name} ${PLATFORM_LIBADD}) - - SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${name}) - IF(WINDOWS) - IF(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.exe) - ELSE(CMAKE_BUILD_TOOL STREQUAL nmake) - SET(${name}_EXEFILE ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${name}.exe) - ENDIF(CMAKE_BUILD_TOOL STREQUAL nmake) - ENDIF(WINDOWS) - INSTALL(FILES ${${name}_EXEFILE} DESTINATION bin/salome PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -ENDFOREACH(name ${_wrap_PROGRAMS}) - -# Generate headers and sources corresponding to the IDL implementations: -INCLUDE(wrap.cmake) - -## From 2.8.10, we should use: -## SET(CMAKE_POSITION_INDEPENDENT_CODE ON) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") -ADD_LIBRARY(VTK_IDL_Impl OBJECT ${WRAP_IDL_I_CC}) - -# Make the list of wrapped files visible from the top directory (will be used in PVGUI and idl): -SET(WRAP_IDL_I_HH "${WRAP_IDL_I_HH}" PARENT_SCOPE) -SET(WRAP_IDL_I_CC "${WRAP_IDL_I_CC}" PARENT_SCOPE) diff --git a/src/VTKParser/GenerateWrapList.cmake b/src/VTKWrapping/GenerateWrapList.cmake similarity index 100% rename from src/VTKParser/GenerateWrapList.cmake rename to src/VTKWrapping/GenerateWrapList.cmake diff --git a/src/ParaView/lex.yy.c b/src/VTKWrapping/ParaView/lex.yy.c similarity index 100% rename from src/ParaView/lex.yy.c rename to src/VTKWrapping/ParaView/lex.yy.c diff --git a/src/ParaView/vtkParse.tab.c b/src/VTKWrapping/ParaView/vtkParse.tab.c similarity index 100% rename from src/ParaView/vtkParse.tab.c rename to src/VTKWrapping/ParaView/vtkParse.tab.c diff --git a/src/ParaView/vtkParseData.c b/src/VTKWrapping/ParaView/vtkParseData.c similarity index 100% rename from src/ParaView/vtkParseData.c rename to src/VTKWrapping/ParaView/vtkParseData.c diff --git a/src/ParaView/vtkParseData.h b/src/VTKWrapping/ParaView/vtkParseData.h similarity index 100% rename from src/ParaView/vtkParseData.h rename to src/VTKWrapping/ParaView/vtkParseData.h diff --git a/src/ParaView/vtkParseExtras.c b/src/VTKWrapping/ParaView/vtkParseExtras.c similarity index 100% rename from src/ParaView/vtkParseExtras.c rename to src/VTKWrapping/ParaView/vtkParseExtras.c diff --git a/src/ParaView/vtkParseExtras.h b/src/VTKWrapping/ParaView/vtkParseExtras.h similarity index 100% rename from src/ParaView/vtkParseExtras.h rename to src/VTKWrapping/ParaView/vtkParseExtras.h diff --git a/src/ParaView/vtkParseHierarchy.c b/src/VTKWrapping/ParaView/vtkParseHierarchy.c similarity index 100% rename from src/ParaView/vtkParseHierarchy.c rename to src/VTKWrapping/ParaView/vtkParseHierarchy.c diff --git a/src/ParaView/vtkParseHierarchy.h b/src/VTKWrapping/ParaView/vtkParseHierarchy.h similarity index 100% rename from src/ParaView/vtkParseHierarchy.h rename to src/VTKWrapping/ParaView/vtkParseHierarchy.h diff --git a/src/ParaView/vtkParseInternal.h b/src/VTKWrapping/ParaView/vtkParseInternal.h similarity index 100% rename from src/ParaView/vtkParseInternal.h rename to src/VTKWrapping/ParaView/vtkParseInternal.h diff --git a/src/ParaView/vtkParseMain.c b/src/VTKWrapping/ParaView/vtkParseMain.c similarity index 100% rename from src/ParaView/vtkParseMain.c rename to src/VTKWrapping/ParaView/vtkParseMain.c diff --git a/src/ParaView/vtkParseMain.h b/src/VTKWrapping/ParaView/vtkParseMain.h similarity index 100% rename from src/ParaView/vtkParseMain.h rename to src/VTKWrapping/ParaView/vtkParseMain.h diff --git a/src/ParaView/vtkParsePreprocess.c b/src/VTKWrapping/ParaView/vtkParsePreprocess.c similarity index 100% rename from src/ParaView/vtkParsePreprocess.c rename to src/VTKWrapping/ParaView/vtkParsePreprocess.c diff --git a/src/ParaView/vtkParsePreprocess.h b/src/VTKWrapping/ParaView/vtkParsePreprocess.h similarity index 100% rename from src/ParaView/vtkParsePreprocess.h rename to src/VTKWrapping/ParaView/vtkParsePreprocess.h diff --git a/src/ParaView/vtkParseString.c b/src/VTKWrapping/ParaView/vtkParseString.c similarity index 100% rename from src/ParaView/vtkParseString.c rename to src/VTKWrapping/ParaView/vtkParseString.c diff --git a/src/ParaView/vtkParseString.h b/src/VTKWrapping/ParaView/vtkParseString.h similarity index 100% rename from src/ParaView/vtkParseString.h rename to src/VTKWrapping/ParaView/vtkParseString.h diff --git a/src/ParaView/vtkWrap.c b/src/VTKWrapping/ParaView/vtkWrap.c similarity index 100% rename from src/ParaView/vtkWrap.c rename to src/VTKWrapping/ParaView/vtkWrap.c diff --git a/src/ParaView/vtkWrap.h b/src/VTKWrapping/ParaView/vtkWrap.h similarity index 100% rename from src/ParaView/vtkWrap.h rename to src/VTKWrapping/ParaView/vtkWrap.h diff --git a/src/ParaView/vtkWrapHierarchy.c b/src/VTKWrapping/ParaView/vtkWrapHierarchy.c similarity index 100% rename from src/ParaView/vtkWrapHierarchy.c rename to src/VTKWrapping/ParaView/vtkWrapHierarchy.c diff --git a/src/ParaView/vtkWrapText.c b/src/VTKWrapping/ParaView/vtkWrapText.c similarity index 100% rename from src/ParaView/vtkWrapText.c rename to src/VTKWrapping/ParaView/vtkWrapText.c diff --git a/src/ParaView/vtkWrapText.h b/src/VTKWrapping/ParaView/vtkWrapText.h similarity index 100% rename from src/ParaView/vtkWrapText.h rename to src/VTKWrapping/ParaView/vtkWrapText.h diff --git a/src/VTKParser/create_class.py b/src/VTKWrapping/create_class.py similarity index 100% rename from src/VTKParser/create_class.py rename to src/VTKWrapping/create_class.py diff --git a/src/VTKParser/create_class.sh b/src/VTKWrapping/create_class.sh similarity index 100% rename from src/VTKParser/create_class.sh rename to src/VTKWrapping/create_class.sh diff --git a/src/VTKParser/getwrapclasses.py b/src/VTKWrapping/getwrapclasses.py similarity index 100% rename from src/VTKParser/getwrapclasses.py rename to src/VTKWrapping/getwrapclasses.py diff --git a/src/VTKParser/readme.txt b/src/VTKWrapping/readme.txt similarity index 100% rename from src/VTKParser/readme.txt rename to src/VTKWrapping/readme.txt diff --git a/src/VTKParser/wrap.cmake b/src/VTKWrapping/wrap.cmake similarity index 100% rename from src/VTKParser/wrap.cmake rename to src/VTKWrapping/wrap.cmake -- 2.39.2