From d3e397c6eafce91c02b50564f076a82f052ea06d Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 15 Apr 2015 10:23:38 +0200 Subject: [PATCH] Removed CMake option OGS_DONT_USE_VTK. --- Applications/CLI/CMakeLists.txt | 9 +++------ CMakeLists.txt | 12 ++---------- FileIO/CMakeLists.txt | 4 +--- FileIO/readMeshFromFile.cpp | 4 ---- FileIO/writeMeshToFile.cpp | 4 ---- MeshLib/CMakeLists.txt | 4 ---- Tests/CMakeLists.txt | 17 ++++++----------- 7 files changed, 12 insertions(+), 42 deletions(-) diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index c1f3e9d361b..b71b45707f0 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -7,15 +7,12 @@ target_link_libraries(ogs ApplicationsLib BaseLib FileIO + InSituLib MeshLib ${Boost_LIBRARIES} + ${CATALYST_LIBRARIES} + ) -if(NOT OGS_DONT_USE_VTK) - target_link_libraries(ogs - InSituLib - ${CATALYST_LIBRARIES} - ) -endif() ADD_CATALYST_DEPENDENCY(ogs) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d351165238..7fd4695a645 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,10 +48,6 @@ endif() # GCC AND GPROF_PATH # Enable / Disable parts option(OGS_DONT_USE_QT "Disables all Qt specific code." OFF) -option(OGS_DONT_USE_VTK "Disables all VTK specific code." OFF) -if(OGS_DONT_USE_VTK) - add_definitions(-DOGS_DONT_USE_VTK) -endif() option(OGS_BUILD_CLI "Should the OGS simulator be built?" ON) option(OGS_BUILD_TESTS "Should the test executables be built?" ON) @@ -100,9 +96,7 @@ include(scripts/cmake/packaging/Pack.cmake) option(Boost_USE_STATIC_LIBS "This option has to be set from the command line (before boost gets found)!" OFF) include(scripts/cmake/ExternalProjectBoost.cmake) option(OGS_SYSTEM_VTK_ONLY "If On VTK / ParaView will be searched if installed and will not be build locally." OFF) -if(NOT OGS_DONT_USE_VTK) - include(scripts/cmake/ExternalProjectCatalyst.cmake) -endif() +include(scripts/cmake/ExternalProjectCatalyst.cmake) include_directories( SYSTEM ${Boost_INCLUDE_DIRS} ) if(OGS_USE_EIGEN) @@ -151,9 +145,7 @@ if(TARGET Boost) endif() add_subdirectory( FileIO ) add_subdirectory( GeoLib ) -if(NOT OGS_DONT_USE_VTK) - add_subdirectory( InSituLib ) -endif() +add_subdirectory( InSituLib ) add_subdirectory( MathLib ) add_subdirectory( MeshLib ) add_subdirectory( MeshGeoToolsLib ) diff --git a/FileIO/CMakeLists.txt b/FileIO/CMakeLists.txt index 97b3da8b024..ffa5960e411 100644 --- a/FileIO/CMakeLists.txt +++ b/FileIO/CMakeLists.txt @@ -26,9 +26,7 @@ set(SOURCES GET_SOURCE_FILES(SOURCES_LEGACY Legacy) GET_SOURCE_FILES(SOURCES_GMSHIO GmshIO) GET_SOURCE_FILES(SOURCES_RAPID_XML RapidXmlIO) -if(NOT OGS_DONT_USE_VTK) - GET_SOURCE_FILES(SOURCES_VTK VtkIO) -endif() +GET_SOURCE_FILES(SOURCES_VTK VtkIO) set(SOURCES ${SOURCES} ${SOURCES_LEGACY} ${SOURCES_GMSHIO} ${SOURCES_RAPID_XML} ${SOURCES_VTK}) GET_SOURCE_FILES(SOURCES_BASE_XML XmlIO) diff --git a/FileIO/readMeshFromFile.cpp b/FileIO/readMeshFromFile.cpp index 36e34574c5b..a8288007856 100644 --- a/FileIO/readMeshFromFile.cpp +++ b/FileIO/readMeshFromFile.cpp @@ -31,9 +31,7 @@ // FileIO #include "Legacy/MeshIO.h" -#ifndef OGS_DONT_USE_VTK #include "FileIO/VtkIO/VtuInterface.h" -#endif #include "readMeshFromFile.h" // FileIO : for reading partitioned mesh. #ifdef USE_PETSC @@ -55,10 +53,8 @@ MeshLib::Mesh* readMeshFromFile(const std::string &file_name) return meshIO.loadMeshFromFile(file_name); } -#ifndef OGS_DONT_USE_VTK if (BaseLib::hasFileExtension("vtu", file_name)) return VtuInterface::readVTUFile(file_name); -#endif ERR("readMeshFromFile(): Unknown mesh file format in file %s.", file_name.c_str()); return nullptr; diff --git a/FileIO/writeMeshToFile.cpp b/FileIO/writeMeshToFile.cpp index 9ec13b71119..f4b907f20c8 100644 --- a/FileIO/writeMeshToFile.cpp +++ b/FileIO/writeMeshToFile.cpp @@ -20,9 +20,7 @@ // FileIO #include "Legacy/MeshIO.h" -#ifndef OGS_DONT_USE_VTK #include "FileIO/VtkIO/VtuInterface.h" -#endif namespace FileIO { @@ -33,11 +31,9 @@ void writeMeshToFile(const MeshLib::Mesh &mesh, const std::string &file_name) Legacy::MeshIO meshIO; meshIO.setMesh(&mesh); meshIO.writeToFile(file_name); -#ifndef OGS_DONT_USE_VTK } else if (BaseLib::hasFileExtension("vtu", file_name)) { FileIO::VtuInterface writer(&mesh); writer.writeToFile(file_name); -#endif } else { ERR("writeMeshToFile(): Unknown mesh file format in file %s.", file_name.c_str()); } diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt index a22d156541e..8a41843600c 100644 --- a/MeshLib/CMakeLists.txt +++ b/MeshLib/CMakeLists.txt @@ -9,10 +9,6 @@ endif() GET_SOURCE_FILES(SOURCES_ELEMENTS Elements) GET_SOURCE_FILES(SOURCES_EDITING MeshEditing) GET_SOURCE_FILES(SOURCES_GENERATORS MeshGenerators) -if(OGS_DONT_USE_VTK) - list(REMOVE_ITEM SOURCES_GENERATORS MeshGenerators/VtkMeshConverter.h) - list(REMOVE_ITEM SOURCES_GENERATORS MeshGenerators/VtkMeshConverter.cpp) -endif() GET_SOURCE_FILES(SOURCES_QUALITY MeshQuality) set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_GENERATORS} ${SOURCES_QUALITY}) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index ea93266e425..63bd0d05878 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -8,14 +8,12 @@ APPEND_SOURCE_FILES(TEST_SOURCES) APPEND_SOURCE_FILES(TEST_SOURCES AssemblerLib) APPEND_SOURCE_FILES(TEST_SOURCES BaseLib) APPEND_SOURCE_FILES(TEST_SOURCES GeoLib) -if(NOT OGS_DONT_USE_VTK) - APPEND_SOURCE_FILES(TEST_SOURCES InSituLib) -endif() +APPEND_SOURCE_FILES(TEST_SOURCES InSituLib) APPEND_SOURCE_FILES(TEST_SOURCES MathLib) APPEND_SOURCE_FILES(TEST_SOURCES MeshLib) APPEND_SOURCE_FILES(TEST_SOURCES NumLib) -set(TEST_SOURCES ${TEST_SOURCES} +set(TEST_SOURCES ${TEST_SOURCES} FileIO/TestGLIReader.cpp FileIO/TestCsvReader.cpp ) @@ -53,6 +51,7 @@ target_link_libraries(testrunner BaseLib FileIO GeoLib + InSituLib MathLib MeshLib MeshGeoToolsLib @@ -60,14 +59,10 @@ target_link_libraries(testrunner logog ${BOOST_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} + ${CATALYST_LIBRARIES} ) -if(NOT OGS_DONT_USE_VTK) - target_link_libraries(testrunner - InSituLib - ${CATALYST_LIBRARIES} - ) - ADD_CATALYST_DEPENDENCY(testrunner) -endif() +ADD_CATALYST_DEPENDENCY(testrunner) + if(OGS_USE_PETSC) target_link_libraries(testrunner ${PETSC_LIBRARIES}) endif() -- GitLab