diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index c1f3e9d361b8f6c469825abffa03e9fee0be7108..b71b45707f08fb5dc7f55050018f321f092ec839 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 4d3511652381d73fcc579fd948be7cb1e3b4f013..7fd4695a645dc2b20fa0c624c8b05509d174389d 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 97b3da8b0249f9a3d936033d06312ec019927388..ffa5960e411bf3dc364ac0b2113a08dd6a9f9ea9 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 36e34574c5b1016c3f1a277175de8614cb747afb..a82880078563719d77c6af400bb0a2dba8518a0d 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 9ec13b71119bd3a82b33cd9491b286c6dcfef8d8..f4b907f20c8ba521d24bbd514af7d34b06de782e 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 a22d156541e1ef1444e4a22e761bd6b9dc9c7cb7..8a41843600ceebc3a5a1ef962f4688542f3e3614 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 ea93266e425669f0d95dafb5519443d36e6253f0..63bd0d05878f18d76fb832a3b0943b898fd3bf59 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()