diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index bb8917b328854f4981be66e7c6687e880ac073bd..f7f1be9afc5ff263e8d0152898c2cf4706e23409 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -1,6 +1,7 @@ add_executable(ogs ogs.cpp) -target_link_libraries(ogs PRIVATE BaseLib ApplicationsLib) +target_link_libraries(ogs + PRIVATE BaseLib ApplicationsLib CMakeInfoLib GitInfoLib) if(OGS_USE_PYTHON) # Troubleshooting: If you get linker errors, such as ogs.cpp:(.text+0xb4): diff --git a/Applications/CLI/ogs.cpp b/Applications/CLI/ogs.cpp index 6ed80a84731980033024c7aa6427f9bc46b94e78..3dbb95bfb62d04d1f8beef1a158c63115d1ed1d5 100644 --- a/Applications/CLI/ogs.cpp +++ b/Applications/CLI/ogs.cpp @@ -27,7 +27,6 @@ #endif // BaseLib -#include "BaseLib/BuildInfo.h" #include "BaseLib/ConfigTreeUtil.h" #include "BaseLib/DateTools.h" #include "BaseLib/FileTools.h" @@ -39,6 +38,8 @@ #include "Applications/ApplicationsLib/ProjectData.h" #include "Applications/ApplicationsLib/TestDefinition.h" #include "Applications/InSituLib/Adaptor.h" +#include "InfoLib/CMakeInfo.h" +#include "InfoLib/GitInfo.h" #include "ProcessLib/TimeLoop.h" #include "NumLib/NumericsConfig.h" @@ -58,11 +59,11 @@ int main(int argc, char* argv[]) "See accompanying file LICENSE.txt or " "http://www.opengeosys.org/project/license\n" "version: " + - BaseLib::BuildInfo::ogs_version + "\n" + + GitInfoLib::GitInfo::ogs_version + "\n" + "CMake arguments: " + - BaseLib::BuildInfo::cmake_args, + CMakeInfoLib::CMakeInfo::cmake_args, ' ', - BaseLib::BuildInfo::ogs_version); + GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> reference_path_arg( "r", "reference", @@ -126,7 +127,7 @@ int main(int argc, char* argv[]) logog_setup.setLevel(log_level_arg.getValue()); INFO("This is OpenGeoSys-6 version %s.", - BaseLib::BuildInfo::ogs_version.c_str()); + GitInfoLib::GitInfo::ogs_version.c_str()); #ifndef _WIN32 // On windows this command line option is not present. // Enable floating point exceptions diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index 96264714217423008a442035851022a9300720e0..7e26c6f5acaa7d39b5327c1bf45f6a65cb5560f4 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -34,6 +34,7 @@ add_executable(DataExplorer target_link_libraries(DataExplorer BaseLib GeoLib + GitInfoLib MeshLib ApplicationsFileIO DataHolderLib diff --git a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h index 5dee06afd9f2f9aa3c8164bcba7a77ab654f0e5f..2cb9fc71ada6ae785f6bcd43fe4dd37559be2d0f 100644 --- a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h +++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h @@ -19,8 +19,6 @@ #include <QString> #include <QVariant> -#include "BaseLib/BuildInfo.h" - #include "TreeItem.h" class QStringList; diff --git a/Applications/DataExplorer/main.cpp b/Applications/DataExplorer/main.cpp index 80f8195fda70b15ab499336c25da0e5319d39f38..512f4a9075a77ff559a93570488761d256bb7cde 100644 --- a/Applications/DataExplorer/main.cpp +++ b/Applications/DataExplorer/main.cpp @@ -15,7 +15,7 @@ FbxScene* lScene = nullptr; #include <vtkSmartPointer.h> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/LogogSimpleFormatter.h" #include "VtkVis/VtkConsoleOutputWindow.h" @@ -38,14 +38,14 @@ int main(int argc, char* argv[]) QApplication a(argc, argv); QApplication::setApplicationName("OpenGeoSys - Data Explorer"); QApplication::setApplicationVersion(QString::fromStdString( - BaseLib::BuildInfo::ogs_version)); + GitInfoLib::GitInfo::ogs_version)); QApplication::setOrganizationName("OpenGeoSys Community"); QApplication::setOrganizationDomain("opengeosys.org"); setlocale(LC_NUMERIC,"C"); QLocale::setDefault(QLocale::German); auto w = std::make_unique<MainWindow>(); w->setWindowTitle( w->windowTitle() + " - " + - QString::fromStdString(BaseLib::BuildInfo::ogs_version)); + QString::fromStdString(GitInfoLib::GitInfo::ogs_version)); if (QCoreApplication::arguments().size()>1) { w->loadFileOnStartUp(QCoreApplication::arguments().at(1)); } diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index 4c50cf002ae059c3593ec52bb788816e7af024e5..850e433f7a3441cd127add716e235faa1d5a414d 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -45,7 +45,7 @@ #include "Applications/FileIO/TetGenInterface.h" #include "Applications/FileIO/XmlIO/Qt/XmlPrjInterface.h" #include "Applications/Utils/OGSFileConverter/OGSFileConverter.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/Histogram.h" #include "GeoLib/DuplicateGeometry.h" @@ -828,10 +828,10 @@ void MainWindow::about() { QString about("<a href='https://www.opengeosys.org'>www.opengeosys.org</a><br /><br />"); about.append(QString("Version: %1<br />") - .arg(QString::fromStdString(BaseLib::BuildInfo::ogs_version))); + .arg(QString::fromStdString(GitInfoLib::GitInfo::ogs_version))); about.append(QString("Git commit: <a href='https://github.com/ufz/ogs/commit/%1'>%1</a><br />") - .arg(QString::fromStdString(BaseLib::BuildInfo::git_version_sha1_short))); + .arg(QString::fromStdString(GitInfoLib::GitInfo::git_version_sha1_short))); about.append(QString("Built date: %1<br />").arg(QDate::currentDate().toString(Qt::ISODate))); QMessageBox::about(this, "About OpenGeoSys 6", about); diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index 95d05766e9410b1dae48fb7485cbd5d95682c94a..d8fd5e927cd7af7e6733650968c870c73a8109b4 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries(ApplicationsFileIO GeoLib MathLib logog - PRIVATE MeshLib) + PRIVATE MeshLib GitInfoLib) if(OGS_BUILD_GUI) # Needed for the XmlPrjInterface, which links the DE/Base/OGSError.h. diff --git a/Applications/FileIO/Gmsh/GMSHInterface.cpp b/Applications/FileIO/Gmsh/GMSHInterface.cpp index 8b56c2eb60b4e5332f47cd9c17e668329aa28521..9d895237ae346abd9a1ba4395ba365ebd9defbe1 100644 --- a/Applications/FileIO/Gmsh/GMSHInterface.cpp +++ b/Applications/FileIO/Gmsh/GMSHInterface.cpp @@ -13,7 +13,7 @@ #include <logog/include/logog.hpp> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "Applications/FileIO/Gmsh/GMSHInterface.h" @@ -74,10 +74,7 @@ GMSHInterface::~GMSHInterface() bool GMSHInterface::write() { - _out << "// GMSH input file created by OpenGeoSys " << BaseLib::BuildInfo::ogs_version; -#ifdef BUILD_TIMESTAMP - _out << " built on " << BaseLib::BuildInfo::build_timestamp; -#endif + _out << "// GMSH input file created by OpenGeoSys " << GitInfoLib::GitInfo::ogs_version; _out << "\n\n"; return writeGMSHInputFile(_out) <= 0; diff --git a/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp b/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp index 90eae86f66f3ab71bb9645674be09f2cc4c1e493..41d7db90505e191580ce2ffff127858d1fe3ca70 100644 --- a/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp +++ b/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp @@ -20,7 +20,6 @@ #include <logog/include/logog.hpp> -#include "BaseLib/BuildInfo.h" #include "BaseLib/FileFinder.h" diff --git a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp index 008d1d711782cc766c855b173188b34cb5f22a1f..cf171223a7a4cdffda40da7c6fee453726282532 100644 --- a/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp +++ b/Applications/FileIO/XmlIO/Qt/XmlPrjInterface.cpp @@ -21,7 +21,6 @@ #include "Applications/DataExplorer/Base/OGSError.h" #include "Applications/DataHolderLib/FemCondition.h" -#include "BaseLib/BuildInfo.h" #include "BaseLib/FileFinder.h" #include "BaseLib/FileTools.h" #include "BaseLib/IO/Writer.h" diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index fdced981ac18d44b9eb77894d0417e816138d40e..ae8eceb3284555752cbbd88a2e4624fee9a70376 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -1,84 +1,30 @@ +set(TOOLS + convertGEO + generateMatPropsFromMatID + GMSH2OGS + OGS2VTK + VTK2OGS + VTK2TIN + TIN2VTK + TecPlotTools + GocadSGridReader + GocadTSurfaceReader + Mesh2Raster) + if(OGS_BUILD_GUI) if(Shapelib_FOUND) - add_executable(ConvertSHPToGLI ConvertSHPToGLI.cpp) - set_target_properties(ConvertSHPToGLI PROPERTIES FOLDER Utilities) - target_link_libraries(ConvertSHPToGLI GeoLib Qt5::Xml - ${Shapelib_LIBRARIES}) + list(APPEND TOOLS ConvertSHPToGLI) endif() - - add_executable(FEFLOW2OGS FEFLOW2OGS.cpp) - set_target_properties(FEFLOW2OGS PROPERTIES FOLDER Utilities) - target_link_libraries(FEFLOW2OGS ApplicationsFileIO) + list(APPEND TOOLS FEFLOW2OGS) endif() -add_executable(convertGEO convertGEO.cpp) -set_target_properties(convertGEO PROPERTIES FOLDER Utilities) -target_link_libraries(convertGEO GeoLib ApplicationsFileIO) - -add_executable(generateMatPropsFromMatID generateMatPropsFromMatID.cpp) -target_link_libraries(generateMatPropsFromMatID MeshLib) -set_target_properties(generateMatPropsFromMatID PROPERTIES FOLDER Utilities) - -add_executable(GMSH2OGS GMSH2OGS.cpp) -set_target_properties(GMSH2OGS PROPERTIES FOLDER Utilities) -target_link_libraries(GMSH2OGS ApplicationsFileIO) - -add_executable(OGS2VTK OGS2VTK.cpp) -set_target_properties(OGS2VTK PROPERTIES FOLDER Utilities) -target_link_libraries(OGS2VTK MeshLib) - -add_executable(VTK2OGS VTK2OGS.cpp) -set_target_properties(VTK2OGS PROPERTIES FOLDER Utilities) -target_link_libraries(VTK2OGS MeshLib) - -add_executable(VTK2TIN VTK2TIN.cpp) -set_target_properties(VTK2TIN PROPERTIES FOLDER Utilities) -target_link_libraries(VTK2TIN MeshLib) - -add_executable(TIN2VTK TIN2VTK.cpp) -set_target_properties(TIN2VTK PROPERTIES FOLDER Utilities) -target_link_libraries(TIN2VTK MeshLib) - -add_executable(TecPlotTools TecPlotTools.cpp) -set_target_properties(TecPlotTools PROPERTIES FOLDER Utilities) -target_link_libraries(TecPlotTools GeoLib MeshLib) +foreach(TOOL ${TOOLS}) + add_executable(${TOOL} ${TOOL}.cpp) + target_link_libraries(${TOOL} ApplicationsFileIO GitInfoLib MeshLib) +endforeach() +set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) +install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) -add_executable(GocadSGridReader GocadSGridReaderMain.cpp) -set_target_properties(GocadSGridReader PROPERTIES FOLDER Utilities) -target_link_libraries(GocadSGridReader GeoLib MeshLib ApplicationsFileIO) - -add_executable(GocadTSurfaceReader GocadTSurfaceReader.cpp) -set_target_properties(GocadTSurfaceReader PROPERTIES FOLDER Utilities) -target_link_libraries(GocadTSurfaceReader MeshLib ApplicationsFileIO) - -add_executable(Mesh2Raster MeshToRaster.cpp) -set_target_properties(Mesh2Raster PROPERTIES FOLDER Utilities) -target_link_libraries(Mesh2Raster MeshLib) - -# ---- Installation ---- -install(TARGETS generateMatPropsFromMatID - GMSH2OGS - OGS2VTK - VTK2OGS - VTK2TIN - TecPlotTools - GocadSGridReader - Mesh2Raster - RUNTIME DESTINATION bin COMPONENT ogs_converter) - -if(OGS_BUILD_GUI) - if(Shapelib_FOUND) - install(TARGETS ConvertSHPToGLI - RUNTIME DESTINATION bin COMPONENT ogs_converter) - endif() - install(TARGETS FEFLOW2OGS convertGEO - RUNTIME DESTINATION bin COMPONENT ogs_converter) +if(TARGET ConvertSHPToGLI) + target_link_libraries(ConvertSHPToGLI GeoLib Qt5::Xml ${Shapelib_LIBRARIES}) endif() - -cpack_add_component(ogs_converter - DISPLAY_NAME - "File converter" - DESCRIPTION - "File converter." - GROUP - Utilities) diff --git a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp index 5bbe450b464433bfa46dd9ac779f7c5e626d9e3d..e1d5e66fdebc14ff6c658f282591ac8e714ddf7a 100644 --- a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp +++ b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp @@ -22,7 +22,7 @@ #include <shapefil.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "GeoLib/IO/XmlIO/Qt/XmlStnInterface.h" @@ -157,11 +157,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Converts points contained in shape file\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> shapefile_arg("s", "shape-file", "the name of the shape file ", diff --git a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp index 0854d0a68cfb183441df698d3b993c3c08a96117..d580218ea35960a8b20c526fe2dddca051edc7bf 100644 --- a/Applications/Utils/FileConverter/FEFLOW2OGS.cpp +++ b/Applications/Utils/FileConverter/FEFLOW2OGS.cpp @@ -16,7 +16,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" #ifndef WIN32 @@ -40,11 +40,11 @@ int main (int argc, char* argv[]) "unstructured grid file (new OGS file format) or to the old OGS file " "format - see options.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> ogs_mesh_arg( "o", diff --git a/Applications/Utils/FileConverter/GMSH2OGS.cpp b/Applications/Utils/FileConverter/GMSH2OGS.cpp index 56298eb6e46777b9651f362bebf41a8bcf6948c0..00190016c1d63b5feb11547e6554d976f2748ab5 100644 --- a/Applications/Utils/FileConverter/GMSH2OGS.cpp +++ b/Applications/Utils/FileConverter/GMSH2OGS.cpp @@ -22,7 +22,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" #ifndef WIN32 @@ -45,11 +45,11 @@ int main (int argc, char* argv[]) "unstructured grid file (new OGS file format) or to the old OGS file " "format - see options.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> ogs_mesh_arg( "o", diff --git a/Applications/Utils/FileConverter/GocadSGridReaderMain.cpp b/Applications/Utils/FileConverter/GocadSGridReader.cpp similarity index 96% rename from Applications/Utils/FileConverter/GocadSGridReaderMain.cpp rename to Applications/Utils/FileConverter/GocadSGridReader.cpp index 005c18104c557199db2564f9aada8c9729e32adc..be15da95ca4aff319e6995b8f4672a406adff7f0 100644 --- a/Applications/Utils/FileConverter/GocadSGridReaderMain.cpp +++ b/Applications/Utils/FileConverter/GocadSGridReader.cpp @@ -17,7 +17,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/GocadIO/GenerateFaceSetMeshes.h" #include "Applications/FileIO/GocadIO/GocadSGridReader.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -35,11 +35,11 @@ int main(int argc, char* argv[]) "https://www.opengeosys.org/docs/tools/meshing/gocadsgridreader/.\n\n " "OpenGeoSys-6 " "software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<bool> face_set_arg( "f", "generate-face-sets", diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp index bd549fbf039a083147446c65589e9595a4436d99..0aa14a89fedc50bc70a6330f6f81ab605937a308 100644 --- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp +++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp @@ -9,7 +9,7 @@ #include <tclap/CmdLine.h> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Mesh.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "Applications/ApplicationsLib/LogogSetup.h" @@ -30,11 +30,11 @@ int main(int argc, char* argv[]) "Reads Gocad ascii files (*.ts, *.pl, *.mx) and writes TSurf- and PLine" "data into one or more VTU unstructured grids.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg( "i", "input-file", "Gocad triangular surfaces file (*.ts)", true, "", diff --git a/Applications/Utils/FileConverter/MeshToRaster.cpp b/Applications/Utils/FileConverter/Mesh2Raster.cpp similarity index 98% rename from Applications/Utils/FileConverter/MeshToRaster.cpp rename to Applications/Utils/FileConverter/Mesh2Raster.cpp index 355f5ddd1c2cd8cc548311388e7ae788f448a827..ca23613bb8d68522090b6fa45900048d900f5826 100644 --- a/Applications/Utils/FileConverter/MeshToRaster.cpp +++ b/Applications/Utils/FileConverter/Mesh2Raster.cpp @@ -14,7 +14,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/AABB.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" @@ -32,11 +32,11 @@ int main(int argc, char* argv[]) "regular grid superimposed on the mesh. If no mesh element is located " "beneath a pixel it is set to NODATA.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-file", "Mesh input file (*.vtu, *.msh)", true, "", "string"); diff --git a/Applications/Utils/FileConverter/OGS2VTK.cpp b/Applications/Utils/FileConverter/OGS2VTK.cpp index fddf988cccc541f7cacdb958265a6af6e8bc3e64..b76ab8e32eb8b112da47f880c6691e3c4e4fd7d4 100644 --- a/Applications/Utils/FileConverter/OGS2VTK.cpp +++ b/Applications/Utils/FileConverter/OGS2VTK.cpp @@ -17,7 +17,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/Mesh.h" @@ -29,11 +29,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Converts OGS mesh into VTK mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in( "i", "mesh-input-file", "the name of the file containing the input mesh", true, "", diff --git a/Applications/Utils/FileConverter/TIN2VTK.cpp b/Applications/Utils/FileConverter/TIN2VTK.cpp index 966e64440ea7b548550019e4f62280ed344f4d55..4a0c003c91de9056df56279c96cc4d9bb4fe8200 100644 --- a/Applications/Utils/FileConverter/TIN2VTK.cpp +++ b/Applications/Utils/FileConverter/TIN2VTK.cpp @@ -16,7 +16,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" // GeoLib @@ -39,11 +39,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Converts TIN file into VTU file.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> inArg("i", "input-tin-file", "the name of the file containing the input TIN", true, "", "string"); diff --git a/Applications/Utils/FileConverter/TecPlotTools.cpp b/Applications/Utils/FileConverter/TecPlotTools.cpp index 38bcb238f099cd503d3e2f1f3afca760d9715433..d07e5286eca8ab566bd4199fd8f362691bd0e8e6 100644 --- a/Applications/Utils/FileConverter/TecPlotTools.cpp +++ b/Applications/Utils/FileConverter/TecPlotTools.cpp @@ -16,7 +16,7 @@ #include <Applications/ApplicationsLib/LogogSetup.h> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/StringTools.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" @@ -413,11 +413,11 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "TecPlot Parser\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-file", "TecPlot input file", true, "", "string"); cmd.add(input_arg); TCLAP::ValueArg<std::string> output_arg("o", "output-file", "output mesh file", false, "", "string"); diff --git a/Applications/Utils/FileConverter/VTK2OGS.cpp b/Applications/Utils/FileConverter/VTK2OGS.cpp index 67f373f69370736d0643d4a449a59e0a99d7e383..01e64345de3674eda6ac09cf68a6a4529c183d24 100644 --- a/Applications/Utils/FileConverter/VTK2OGS.cpp +++ b/Applications/Utils/FileConverter/VTK2OGS.cpp @@ -17,7 +17,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/IO/Legacy/MeshIO.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "MeshLib/Mesh.h" @@ -29,11 +29,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Converts VTK mesh into OGS mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/FileConverter/VTK2TIN.cpp b/Applications/Utils/FileConverter/VTK2TIN.cpp index 6877836c58fa40b7cb1ea5e2a2ca8ebced3081f8..9488d6d366e2e9ef9da8eab44830e377dde280af 100644 --- a/Applications/Utils/FileConverter/VTK2TIN.cpp +++ b/Applications/Utils/FileConverter/VTK2TIN.cpp @@ -16,7 +16,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" // BaseLib -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/LogogSimpleFormatter.h" // GeoLib @@ -40,11 +40,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Converts VTK mesh into TIN file.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/FileConverter/convertGEO.cpp b/Applications/Utils/FileConverter/convertGEO.cpp index 3353a0b0098f0ea62d9669520b3f512cfe728b29..05e2cdb07cf48e3b023839c314b66e191f9c8478 100644 --- a/Applications/Utils/FileConverter/convertGEO.cpp +++ b/Applications/Utils/FileConverter/convertGEO.cpp @@ -12,7 +12,7 @@ #include <tclap/CmdLine.h> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" @@ -29,11 +29,11 @@ int main (int argc, char* argv[]) "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) " "formats are supported.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> argInputFileName("i", "input-file", "the name of the geometry file to be converted", true, "", "file name"); diff --git a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp index a5ce5361242fbbd519be28708ded5379ae0978b0..4ab4b09e3b052812e39280ed3b0f50ba11225141 100644 --- a/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp +++ b/Applications/Utils/FileConverter/generateMatPropsFromMatID.cpp @@ -18,7 +18,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -35,11 +35,11 @@ int main (int argc, char* argv[]) "Creates a new file for material properties and sets the material ids " "in the msh-file to 0\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_arg("m", "mesh", diff --git a/Applications/Utils/GeoTools/CMakeLists.txt b/Applications/Utils/GeoTools/CMakeLists.txt index a721629a0e49f0cc8bd63e97cf8b7607aeea25fa..d925823fca5f6091198826bd0738fbb9fa31ae6c 100644 --- a/Applications/Utils/GeoTools/CMakeLists.txt +++ b/Applications/Utils/GeoTools/CMakeLists.txt @@ -5,7 +5,11 @@ endif() set(TOOLS MoveGeometry TriangulatePolyline) foreach(TOOL ${TOOLS}) add_executable(${TOOL} ${TOOL}.cpp) - target_link_libraries(${TOOL} GeoLib ApplicationsFileIO Qt5::Core) + target_link_libraries(${TOOL} + GeoLib + GitInfoLib + ApplicationsFileIO + Qt5::Core) endforeach() set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/Applications/Utils/GeoTools/MoveGeometry.cpp b/Applications/Utils/GeoTools/MoveGeometry.cpp index fe74c076c33dd5f5413c08f0f929a638d9dadaa6..2a1b3813b8e193ab70dcf241fbf26e7218285afb 100644 --- a/Applications/Utils/GeoTools/MoveGeometry.cpp +++ b/Applications/Utils/GeoTools/MoveGeometry.cpp @@ -15,7 +15,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "MathLib/Vector3.h" @@ -31,11 +31,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Moves the points of a geometry by a given displacement vector\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<double> z_arg ("z", "z", "displacement in z direction", false, 0.0, "z-displacement"); cmd.add(z_arg); diff --git a/Applications/Utils/GeoTools/TriangulatePolyline.cpp b/Applications/Utils/GeoTools/TriangulatePolyline.cpp index 66ea4231c0a5cc8f349cdb9b82293b6f12bc42f4..4cbeb341a3972cecbfb1c02b20c8c884d7949acc 100644 --- a/Applications/Utils/GeoTools/TriangulatePolyline.cpp +++ b/Applications/Utils/GeoTools/TriangulatePolyline.cpp @@ -18,7 +18,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/Legacy/createSurface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "GeoLib/AnalyticalGeometry.h" @@ -45,11 +45,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Triangulates the specified polyline in the given geometry file.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input", "GML input file (*.gml)", true, "", "string"); TCLAP::ValueArg<std::string> output_arg("o", "output", "GML output file (*.gml)", true, "", "string"); TCLAP::ValueArg<std::string> name_arg("n", "name", "Name of polyline in given file", true, "", "string"); diff --git a/Applications/Utils/MeshEdit/AddTopLayer.cpp b/Applications/Utils/MeshEdit/AddTopLayer.cpp index 47f3d119a975d0794a7fe6f82958fa56c7e98465..eff5dfcf69b6a03288fb748a7f5742488b85af9a 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -14,7 +14,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -30,11 +30,11 @@ int main (int argc, char* argv[]) "The documentation is available at " "https://docs.opengeosys.org/docs/tools/meshing/addtoplayer.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_arg("i", "input-mesh-file", "the name of the file containing the mesh", true, "", "file name"); diff --git a/Applications/Utils/MeshEdit/CMakeLists.txt b/Applications/Utils/MeshEdit/CMakeLists.txt index 780ee023752e53f9f5d4e3bac0efd0c52e1fed2c..ea9bef3f1b6f0418ea8955fbc5b259d01a380505 100644 --- a/Applications/Utils/MeshEdit/CMakeLists.txt +++ b/Applications/Utils/MeshEdit/CMakeLists.txt @@ -20,7 +20,7 @@ set(TOOLS UnityPreprocessing) foreach(TOOL ${TOOLS}) add_executable(${TOOL} ${TOOL}.cpp) - target_link_libraries(${TOOL} MeshLib) + target_link_libraries(${TOOL} GitInfoLib MeshLib) endforeach() set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp index 30cfb059bc62b5e691ca704d89e8cdc8c571b5a5..95740a623d29aa34b056dc0aa29ac2ec0e163c94 100644 --- a/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp +++ b/Applications/Utils/MeshEdit/CreateBoundaryConditionsAlongPolylines.cpp @@ -20,7 +20,7 @@ #include "Applications/FileIO/readGeometryFromFile.h" #include "Applications/FileIO/writeGeometryToFile.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -131,11 +131,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/model-preparation/" "create-boundary-conditions-along-a-polyline.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<bool> gml_arg("", "gml", "if switched on write found nodes to file in gml format", false, false, "bool"); cmd.add(gml_arg); diff --git a/Applications/Utils/MeshEdit/ExtractSurface.cpp b/Applications/Utils/MeshEdit/ExtractSurface.cpp index ef7e3787c02688aa83d048613703130f27f71541..085482675f3e0a46b49344667cf5e02d3d7cfcdf 100644 --- a/Applications/Utils/MeshEdit/ExtractSurface.cpp +++ b/Applications/Utils/MeshEdit/ExtractSurface.cpp @@ -17,7 +17,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/StringTools.h" @@ -40,11 +40,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/meshing-submeshes/" "extract-surface.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in( "i", "mesh-input-file", "the name of the file containing the input mesh", true, "", diff --git a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp index 79aa2fbc544ba70e4a2fcbc4745c55f89594c2e2..fc5f1748efe78b9c3551df4295b3fed9ce596b21 100644 --- a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp +++ b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp @@ -15,7 +15,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" #include "MeshGeoToolsLib/GeoMapper.h" @@ -32,11 +32,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/model-preparation/" "map-geometric-object-to-the-surface-of-a-mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("m", "mesh-file", "the name of the file containing the mesh", true, "", "file name"); diff --git a/Applications/Utils/MeshEdit/MoveMesh.cpp b/Applications/Utils/MeshEdit/MoveMesh.cpp index 3130ad8ffef163a4307c086e899914757ee458eb..de36e16019938e0a9fa9070e0f8632f51ec28455 100644 --- a/Applications/Utils/MeshEdit/MoveMesh.cpp +++ b/Applications/Utils/MeshEdit/MoveMesh.cpp @@ -13,7 +13,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/StringTools.h" #include "GeoLib/AABB.h" @@ -33,11 +33,11 @@ int main(int argc, char *argv[]) "displacement vector is given, moves the mesh nodes such that the " "centroid of the given mesh is in the origin.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); // Define a value argument and add it to the command line. // A value arg defines a flag and a type of value that it expects, // such as "-m meshfile". diff --git a/Applications/Utils/MeshEdit/NodeReordering.cpp b/Applications/Utils/MeshEdit/NodeReordering.cpp index db72cda1060b48180d1cc4852b163fcc7a678e37..9042ac59c693d6f5f1d8c61a6829fecd049ccf0b 100644 --- a/Applications/Utils/MeshEdit/NodeReordering.cpp +++ b/Applications/Utils/MeshEdit/NodeReordering.cpp @@ -18,7 +18,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "BaseLib/Algorithm.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -153,11 +153,11 @@ int main (int argc, char* argv[]) "Method 2 is the re-ordering with and without InSitu-Lib in OGS6.\n" "Method 3 is the re-ordering of nonlinear nodes.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::UnlabeledValueArg<std::string> input_mesh_arg("input_mesh", "the name of the input mesh file", true, "", "oldmesh.msh"); diff --git a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp index 18102c33a3629387bd3617d61546f82434749570..d59d1859137a8e7abb38768e2e0df278544a9c6b 100644 --- a/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp +++ b/Applications/Utils/MeshEdit/ResetPropertiesInPolygonalRegion.cpp @@ -17,7 +17,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/Polygon.h" #include "MeshGeoToolsLib/MeshEditing/ResetMeshElementProperty.h" @@ -36,11 +36,11 @@ int main(int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/model-preparation/" "set-properties-in-polygonal-region.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_out( "o", "mesh-output-file", "the name of the file the mesh will be written to, format depends on " diff --git a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp index 150b7bf340efaedff8a43c1ebc74e0c1ef74bd29..1b09dbced85fda87f270bcbbb1a4b43a77c9112b 100644 --- a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp +++ b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp @@ -12,7 +12,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Elements/Hex.h" #include "MeshLib/Elements/Line.h" #include "MeshLib/Elements/Prism.h" @@ -186,11 +186,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Prepares OGS-meshes for use in Unity.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_arg("i", "input", "the file containing the original OGS mesh", true, diff --git a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp index 91586584edf173c6d700f95d78d9a2bea1be91ea..e751ea1eaa8abc9534edf67945e7c750e094730a 100644 --- a/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp +++ b/Applications/Utils/MeshEdit/appendLinesAlongPolyline.cpp @@ -11,7 +11,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "GeoLib/GEOObjects.h" @@ -30,11 +30,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Append line elements into a mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/MeshEdit/checkMesh.cpp b/Applications/Utils/MeshEdit/checkMesh.cpp index 462abd7bbb7061b7bd8d1ea70cf838e06be12415..7b960990ce6339ba5f91c63693e86e702d3514be 100644 --- a/Applications/Utils/MeshEdit/checkMesh.cpp +++ b/Applications/Utils/MeshEdit/checkMesh.cpp @@ -13,7 +13,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/StringTools.h" #include "BaseLib/MemWatch.h" #include "BaseLib/RunTime.h" @@ -36,11 +36,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Checks mesh properties.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::UnlabeledValueArg<std::string> mesh_arg("mesh-file","input mesh file",true,"","string"); cmd.add( mesh_arg ); TCLAP::SwitchArg valid_arg("v","validation","validate the mesh"); diff --git a/Applications/Utils/MeshEdit/convertToLinearMesh.cpp b/Applications/Utils/MeshEdit/convertToLinearMesh.cpp index ab5eb03dc1ec7e2fa76fa625f791f1b523fd8d8a..fe2979f9403b0064071839571c665c9f49c5624e 100644 --- a/Applications/Utils/MeshEdit/convertToLinearMesh.cpp +++ b/Applications/Utils/MeshEdit/convertToLinearMesh.cpp @@ -14,7 +14,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshEditing/ConvertToLinearMesh.h" @@ -30,11 +30,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Convert a non-linear mesh to a linear mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp index 016b49fa6c59b18051102f342dccd7eacb8d9e30..01848ea800b6bc99ddf29d37c106823402b67a82 100644 --- a/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp +++ b/Applications/Utils/MeshEdit/createLayeredMeshFromRasters.cpp @@ -20,7 +20,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -65,11 +65,11 @@ int main (int argc, char* argv[]) "files representing subsurface layers. Supported raster formats are " "ArcGIS ascii rasters (*.asc) and Surfer Grids (*.grd).\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_arg( "i", "input-mesh-file", diff --git a/Applications/Utils/MeshEdit/createQuadraticMesh.cpp b/Applications/Utils/MeshEdit/createQuadraticMesh.cpp index 94f29ca944a311d55e904cfce85c6cc427d259e6..756cada3ccdf6d56ec4e920c6a188068e679d679 100644 --- a/Applications/Utils/MeshEdit/createQuadraticMesh.cpp +++ b/Applications/Utils/MeshEdit/createQuadraticMesh.cpp @@ -14,7 +14,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshGenerators/QuadraticMeshGenerator.h" @@ -30,11 +30,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Create quadratic order mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); diff --git a/Applications/Utils/MeshEdit/editMaterialID.cpp b/Applications/Utils/MeshEdit/editMaterialID.cpp index 4db9b383fb509afa5646d1bee9d8c002367cd6ba..329787dfb4a4cbf03ad7b7a54de4454bed361c09 100644 --- a/Applications/Utils/MeshEdit/editMaterialID.cpp +++ b/Applications/Utils/MeshEdit/editMaterialID.cpp @@ -11,7 +11,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -25,11 +25,11 @@ int main (int argc, char* argv[]) TCLAP::CmdLine cmd( "Edit material IDs of mesh elements.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::SwitchArg replaceArg("r", "replace", "replace material IDs", false); TCLAP::SwitchArg condenseArg("c", "condense", "condense material IDs", false); TCLAP::SwitchArg specifyArg("s", "specify", "specify material IDs by element types (-e)", false); diff --git a/Applications/Utils/MeshEdit/moveMeshNodes.cpp b/Applications/Utils/MeshEdit/moveMeshNodes.cpp index e485983a2ff2cb8109069051b36dda5c7f8d7a7b..4b6f531a1b3dbc757533942f6bfb8aa8e1ef445e 100644 --- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp +++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp @@ -13,7 +13,7 @@ #include <string> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "GeoLib/AABB.h" #include "MathLib/MathTools.h" diff --git a/Applications/Utils/MeshEdit/queryMesh.cpp b/Applications/Utils/MeshEdit/queryMesh.cpp index ccdec0b80daa60f73f36b8ac89f4000d42c3660a..12d392ff086b4c9f47960244fef15bd1eb85b0bf 100644 --- a/Applications/Utils/MeshEdit/queryMesh.cpp +++ b/Applications/Utils/MeshEdit/queryMesh.cpp @@ -15,7 +15,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/StringTools.h" #include "BaseLib/FileTools.h" @@ -31,11 +31,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Query mesh information.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::UnlabeledValueArg<std::string> mesh_arg("mesh-file","input mesh file",true,"","string"); cmd.add( mesh_arg ); TCLAP::MultiArg<std::size_t> eleId_arg("e","element-id","element ID",false,"number"); diff --git a/Applications/Utils/MeshEdit/removeMeshElements.cpp b/Applications/Utils/MeshEdit/removeMeshElements.cpp index d6f275078b222bc8153c254cadaf54b4e5e05988..675c0d346d4815839c100d5a8a4ba7e88ccfb32a 100644 --- a/Applications/Utils/MeshEdit/removeMeshElements.cpp +++ b/Applications/Utils/MeshEdit/removeMeshElements.cpp @@ -16,7 +16,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -77,11 +77,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/meshing/" "remove-mesh-elements.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); // Bounding box params TCLAP::ValueArg<double> zLargeArg("", "z-max", "largest allowed extent in z-dimension", diff --git a/Applications/Utils/MeshEdit/reviseMesh.cpp b/Applications/Utils/MeshEdit/reviseMesh.cpp index beef0654bb4850f5c5cca3d46ce719acf8125006..052283c2c1192baf368f0bc0528abfcad13a481c 100644 --- a/Applications/Utils/MeshEdit/reviseMesh.cpp +++ b/Applications/Utils/MeshEdit/reviseMesh.cpp @@ -15,7 +15,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/StringTools.h" #include "BaseLib/FileTools.h" @@ -34,11 +34,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Mesh revision tool.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp b/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp index d91cd3a780dfeaeaae3158cbb3b8be43e2819911..ec8f064f0b7155f49219f62b8625e9e6c221dfe0 100644 --- a/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp +++ b/Applications/Utils/MeshEdit/swapNodeCoordinateAxes.cpp @@ -15,7 +15,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Mesh.h" #include "MeshLib/Node.h" @@ -95,11 +95,11 @@ int main(int argc, char *argv[]) TCLAP::CmdLine cmd( "Swap node coordinate values.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg<std::string> output_arg("o", "output-mesh-file","output mesh file",true,"","string"); diff --git a/Applications/Utils/MeshGeoTools/CMakeLists.txt b/Applications/Utils/MeshGeoTools/CMakeLists.txt index c5b69d1e445070fd097c89810d2aa1eaeaa8fd14..98082d8586373093e7ffc639214310f5b7efdee9 100644 --- a/Applications/Utils/MeshGeoTools/CMakeLists.txt +++ b/Applications/Utils/MeshGeoTools/CMakeLists.txt @@ -2,7 +2,11 @@ set(TOOLS computeSurfaceNodeIDsInPolygonalRegion constructMeshesFromGeometry identifySubdomains) foreach(TOOL ${TOOLS}) add_executable(${TOOL} ${TOOL}.cpp) - target_link_libraries(${TOOL} MeshLib ApplicationsFileIO MeshGeoToolsLib) + target_link_libraries(${TOOL} + ApplicationsFileIO + GitInfoLib + MeshLib + MeshGeoToolsLib) endforeach() set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp index 17c016a7fd2703e93f6f5e54f7977d501262470b..59f9b4b6b391906ea59e34d7ee19314311853635 100644 --- a/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp +++ b/Applications/Utils/MeshGeoTools/computeSurfaceNodeIDsInPolygonalRegion.cpp @@ -19,7 +19,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/readGeometryFromFile.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/Error.h" #include "BaseLib/FileTools.h" #include "GeoLib/GEOObjects.h" @@ -74,11 +74,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/model-preparation/" "computesurfacenodeidsinpolygonalregion.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("m", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp index d370b79c9996f92666fb18e7c57e436efd3e6eb2..d4d5ebdc6b54063142fe8883092d1b52a868e7b2 100644 --- a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp +++ b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp @@ -10,7 +10,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" #include "MeshGeoToolsLib/ConstructMeshesFromGeometries.h" @@ -39,11 +39,11 @@ int main(int argc, char* argv[]) "https://www.opengeosys.org/docs/tools/meshing-submeshes/" "constructmeshesfromgeometry/.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<double> search_length_arg( "s", diff --git a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp index c2e3765320931cb0ac876ca34ab17f5c4e0d0d4c..7d45bfad7bce000397462843b8aeab2b00d57027 100644 --- a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp +++ b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp @@ -10,7 +10,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshGeoToolsLib/IdentifySubdomainMesh.h" #include "MeshGeoToolsLib/MeshNodeSearcher.h" #include "MeshGeoToolsLib/SearchLength.h" @@ -51,11 +51,11 @@ int main(int argc, char* argv[]) "https://www.opengeosys.org/docs/tools/meshing-submeshes/" "identifysubdomains/.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<bool> force_overwrite_arg( "f", diff --git a/Applications/Utils/ModelPreparation/CMakeLists.txt b/Applications/Utils/ModelPreparation/CMakeLists.txt index 2433d9ab5f6d9f134183436014e8d0f3271346bf..683b6ebf448a11c5aa562d71e7180f5ae703f02b 100644 --- a/Applications/Utils/ModelPreparation/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/CMakeLists.txt @@ -2,7 +2,7 @@ set(TOOLS ComputeNodeAreasFromSurfaceMesh convertVtkDataArrayToVtkDataArray createNeumannBc scaleProperty) foreach(TOOL ${TOOLS}) add_executable(${TOOL} ${TOOL}.cpp) - target_link_libraries(${TOOL} MeshLib) + target_link_libraries(${TOOL} GitInfoLib MeshLib) endforeach() set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp index 654f30bb721ae639b9344367f2b7488e92ed7e3a..a0124c859888c6510f9d910ec382a247b58a563c 100644 --- a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp +++ b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp @@ -17,7 +17,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/Error.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -63,11 +63,11 @@ int main (int argc, char* argv[]) "The tool computes the area per node of the surface mesh and writes " "the information as txt and csv data.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_in("i", "mesh-input-file", "the name of the file containing the input mesh", true, "", "file name of input mesh"); diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt index 332cc0696513301fadeb310978d6770e7589bc4e..44b852e052c0b0a028e7182beb2eb5d7cfa92ed3 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt +++ b/Applications/Utils/ModelPreparation/PartitionMesh/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(partmesh PartitionMesh.cpp Metis.cpp NodeWiseMeshPartitioner.cpp) set_target_properties(partmesh PROPERTIES FOLDER Utilities) -target_link_libraries(partmesh MeshLib) +target_link_libraries(partmesh GitInfoLib MeshLib) add_dependencies(partmesh mpmetis) install(TARGETS partmesh RUNTIME DESTINATION bin COMPONENT ogs_partmesh) diff --git a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp index 5f6541789116e48ca3fcdd34cd6bccd2235d4a73..a492768148fdc8d4de2dc396716093d7e3a69c93 100644 --- a/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp +++ b/Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp @@ -21,7 +21,7 @@ #endif #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/CPUTime.h" #include "BaseLib/FileTools.h" #include "BaseLib/RunTime.h" @@ -47,11 +47,11 @@ int main(int argc, char* argv[]) "Note: If this tool is installed as a system command,\n" "\tthe command must be run with its full path.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_input( "i", "mesh-input-file", "the name of the file containing the input mesh", true, "", diff --git a/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp b/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp index 613c48c1318c1194bc5847acb8a3c91a02e1f93c..1dd355c64bc654bcbcc2c51d31ad246a0523851c 100644 --- a/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp +++ b/Applications/Utils/ModelPreparation/convertVtkDataArrayToVtkDataArray.cpp @@ -17,7 +17,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -62,11 +62,11 @@ int main(int argc, char* argv[]) "Converts a double or floating point cell data array of a vtk " "unstructured grid into a int or double cell data array.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> new_property_data_type_arg( "t", diff --git a/Applications/Utils/ModelPreparation/createNeumannBc.cpp b/Applications/Utils/ModelPreparation/createNeumannBc.cpp index ae36ccec6206f2b1ce52134f4d270ffce6abb502..44b2ac2cce22f6cfb308421ad3d461f57e1f0a8c 100644 --- a/Applications/Utils/ModelPreparation/createNeumannBc.cpp +++ b/Applications/Utils/ModelPreparation/createNeumannBc.cpp @@ -11,7 +11,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -83,11 +83,11 @@ int main(int argc, char* argv[]) "mesh node ids. Such surface meshes can be created using the OGS-6 " "tool ExtractSurface.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> in_mesh("i", "in-mesh", diff --git a/Applications/Utils/ModelPreparation/scaleProperty.cpp b/Applications/Utils/ModelPreparation/scaleProperty.cpp index aad6f5437f1b81ad141dc313469cd37ee9107e44..6dc346ce799a59cecfe0b4955089311c2de70c65 100644 --- a/Applications/Utils/ModelPreparation/scaleProperty.cpp +++ b/Applications/Utils/ModelPreparation/scaleProperty.cpp @@ -16,7 +16,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/Mesh.h" @@ -28,11 +28,11 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "Scales a property of a mesh.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> out_mesh_arg( "o", diff --git a/Applications/Utils/OGSFileConverter/CMakeLists.txt b/Applications/Utils/OGSFileConverter/CMakeLists.txt index ec758b6a05f930d0c1ee726b246c38938d34536a..8fca073290d3b5def7a402eab5fbf3213e8a2ab1 100644 --- a/Applications/Utils/OGSFileConverter/CMakeLists.txt +++ b/Applications/Utils/OGSFileConverter/CMakeLists.txt @@ -13,7 +13,7 @@ set_target_properties(OGSFileConverterLib PROPERTIES AUTOMOC TRUE AUTOUIC TRUE) add_executable(OGSFileConverter main.cpp) target_link_libraries(OGSFileConverter - PUBLIC OGSFileConverterLib ApplicationsFileIO) + PUBLIC ApplicationsFileIO GitInfoLib OGSFileConverterLib) add_autogen_include(OGSFileConverterLib) diff --git a/Applications/Utils/OGSFileConverter/main.cpp b/Applications/Utils/OGSFileConverter/main.cpp index 796ab01b5397270ecd028330bbc42bcea44e15eb..128f34be0674a3a50d7a14f662b53c790d0f4118 100644 --- a/Applications/Utils/OGSFileConverter/main.cpp +++ b/Applications/Utils/OGSFileConverter/main.cpp @@ -14,7 +14,7 @@ #include <tclap/CmdLine.h> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include <QApplication> @@ -26,11 +26,11 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "A conversion tool for ogs5 and ogs6 files.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> gmsh_path_arg("g", "gmsh-path", "the path to the gmsh binary", false, "", "path as string"); diff --git a/Applications/Utils/PostProcessing/CMakeLists.txt b/Applications/Utils/PostProcessing/CMakeLists.txt index 52469fed16de8045ae6eaa58c47fa17e8e26705f..f35da2417d05b9a81b4e41ec822cbaf12532645b 100644 --- a/Applications/Utils/PostProcessing/CMakeLists.txt +++ b/Applications/Utils/PostProcessing/CMakeLists.txt @@ -1,6 +1,6 @@ if(OGS_BUILD_PROCESS_LIE) add_executable(postLIE postLIE.cpp) - target_link_libraries(postLIE LIECommon) + target_link_libraries(postLIE GitInfoLib LIECommon) set_target_properties(postLIE PROPERTIES FOLDER Utilities) install(TARGETS postLIE RUNTIME DESTINATION bin COMPONENT Utilities) endif() diff --git a/Applications/Utils/PostProcessing/postLIE.cpp b/Applications/Utils/PostProcessing/postLIE.cpp index fe9cc2babc95120fefec1953043237a121039f49..0d62eb67a611a83de8fc6a94a3a001dfaedb463b 100644 --- a/Applications/Utils/PostProcessing/postLIE.cpp +++ b/Applications/Utils/PostProcessing/postLIE.cpp @@ -16,7 +16,7 @@ #include <boost/property_tree/xml_parser.hpp> #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "MeshLib/IO/readMeshFromFile.h" #include "MeshLib/IO/writeMeshToFile.h" @@ -121,11 +121,11 @@ int main(int argc, char* argv[]) TCLAP::CmdLine cmd( "Post-process results of the LIE approach.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> arg_out_file( "o", "output-file", "the name of the new PVD or VTU file", true, "", "path"); diff --git a/Applications/Utils/SWMMConverter/CMakeLists.txt b/Applications/Utils/SWMMConverter/CMakeLists.txt index 1b78a128bc835e68dcecb9195a2aeb72230ebabb..77f9e68a993793e6bd5c1328c6699e3d6ffb75b1 100644 --- a/Applications/Utils/SWMMConverter/CMakeLists.txt +++ b/Applications/Utils/SWMMConverter/CMakeLists.txt @@ -2,6 +2,7 @@ add_executable(SWMMConverter SWMMConverter.cpp) target_link_libraries(SWMMConverter ApplicationsFileIO GeoLib + GitInfoLib MeshLib SwmmInterface) include_directories(${PROJECT_SOURCE_DIR}/Applications/FileIO) diff --git a/Applications/Utils/SWMMConverter/SWMMConverter.cpp b/Applications/Utils/SWMMConverter/SWMMConverter.cpp index dae12ad9bb6139fdeb3f98ef9a1fc4c6bba4d985..9be488ba1e4b42008b7635c9f194c63c4e793762 100644 --- a/Applications/Utils/SWMMConverter/SWMMConverter.cpp +++ b/Applications/Utils/SWMMConverter/SWMMConverter.cpp @@ -12,7 +12,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/StringTools.h" @@ -172,11 +172,11 @@ int main(int argc, char* argv[]) "Read files for the Storm Water Management Model (SWMM) and converts " "them into OGS data structures.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> mesh_output_arg( "m", "mesh", "mesh output file (*.vtu)", false, "", "mesh output file"); cmd.add(mesh_output_arg); diff --git a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt index 91562281a1b1b199ae3213e586a7212f783cc65b..ebef70b4a168798aaadfe119aefa7fc13785584a 100644 --- a/Applications/Utils/SimpleMeshCreation/CMakeLists.txt +++ b/Applications/Utils/SimpleMeshCreation/CMakeLists.txt @@ -1,19 +1,11 @@ +set(TOOLS generateStructuredMesh) if(OGS_BUILD_GUI) - add_executable(createMeshElemPropertiesFromASCRaster - createMeshElemPropertiesFromASCRaster.cpp) - set_target_properties(createMeshElemPropertiesFromASCRaster - PROPERTIES FOLDER Utilities) - target_link_libraries(createMeshElemPropertiesFromASCRaster - ApplicationsFileIO MeshLib) + list(APPEND TOOLS createMeshElemPropertiesFromASCRaster) endif() -add_executable(generateStructuredMesh generateStructuredMesh.cpp) -target_link_libraries(generateStructuredMesh MeshLib) -set_target_properties(generateStructuredMesh PROPERTIES FOLDER Utilities) - -install(TARGETS generateStructuredMesh - RUNTIME DESTINATION bin COMPONENT Utilities) -if(OGS_BUILD_GUI) - install(TARGETS createMeshElemPropertiesFromASCRaster - RUNTIME DESTINATION bin COMPONENT Utilities) -endif() +foreach(TOOL ${TOOLS}) + add_executable(${TOOL} ${TOOL}.cpp) + target_link_libraries(${TOOL} ApplicationsFileIO GitInfoLib MeshLib) +endforeach() +set_target_properties(${TOOLS} PROPERTIES FOLDER Utilities) +install(TARGETS ${TOOLS} RUNTIME DESTINATION bin COMPONENT Utilities) diff --git a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp index 422f287e9953df5f85e7eb72721d94b2ed23ba46..3824852a8402b17b532e9ef79897611759d961be 100644 --- a/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp +++ b/Applications/Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp @@ -18,7 +18,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/FileIO/AsciiRasterInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "BaseLib/quicksort.h" #include "GeoLib/Raster.h" @@ -40,11 +40,11 @@ int main(int argc, char* argv[]) "Generates properties for mesh elements of an input mesh deploying a " "ASC raster file.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); TCLAP::ValueArg<std::string> out_mesh_arg( "o", diff --git a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp index 719a4c1a213b7ec246a629c47ac7425a0945c94e..555983456ec4fb58ec5425969208ff786988b2e5 100644 --- a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp +++ b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp @@ -15,7 +15,7 @@ #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/Error.h" #include "BaseLib/Subdivision.h" #include "BaseLib/TCLAPCustomOutput.h" @@ -67,11 +67,11 @@ int main (int argc, char* argv[]) "https://docs.opengeosys.org/docs/tools/meshing/" "structured-mesh-generation.\n\n" "OpenGeoSys-6 software, version " + - BaseLib::BuildInfo::ogs_version + + GitInfoLib::GitInfo::ogs_version + ".\n" "Copyright (c) 2012-2019, OpenGeoSys Community " "(http://www.opengeosys.org)", - ' ', BaseLib::BuildInfo::ogs_version); + ' ', GitInfoLib::GitInfo::ogs_version); auto tclapOutput = std::make_unique<BaseLib::TCLAPCustomOutput>(); cmd.setOutput(tclapOutput.get()); diff --git a/BaseLib/BuildInfo.cpp.in b/BaseLib/BuildInfo.cpp.in deleted file mode 100644 index a6eb516b9d257512fe8e251de56f410f737a341b..0000000000000000000000000000000000000000 --- a/BaseLib/BuildInfo.cpp.in +++ /dev/null @@ -1,39 +0,0 @@ -/** - * \brief Build information. - * - * \copyright - * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#include "BaseLib/BuildInfo.h" - -namespace BaseLib -{ - -namespace BuildInfo -{ - - const std::string build_timestamp("@BUILD_TIMESTAMP@"); - - const std::string cmake_cxx_compiler("@CMAKE_CXX_COMPILER@"); - const std::string cmake_cxx_flags("@CMAKE_CXX_FLAGS@"); - const std::string cmake_cxx_flags_release("@CMAKE_CXX_FLAGS_RELEASE@"); - const std::string cmake_cxx_flags_debug("@CMAKE_CXX_FLAGS_DEBUG@"); - - const std::string git_version_sha1("@GIT_SHA1@"); - const std::string git_version_sha1_short("@GIT_SHA1_SHORT@"); - - const std::string ogs_version("@OGS_VERSION@"); - const std::string cmake_args("@CMAKE_ARGS_ESCAPED@"); - - const std::string source_path("@CMAKE_CURRENT_SOURCE_DIR@"); - const std::string data_path("@Data_SOURCE_DIR@"); - const std::string data_binary_path("@Data_BINARY_DIR@"); - const std::string tests_tmp_path("@PROJECT_BINARY_DIR@/Tests/"); - -} -} diff --git a/BaseLib/BuildInfo.h b/BaseLib/BuildInfo.h deleted file mode 100644 index 08e067764ae7e987f315a13f181b4deac8a843cf..0000000000000000000000000000000000000000 --- a/BaseLib/BuildInfo.h +++ /dev/null @@ -1,41 +0,0 @@ -/** - * \brief Build information. - * - * \copyright - * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - * - */ - -#pragma once - -#include <string> - -#include "baselib_export.h" - -namespace BaseLib -{ - -namespace BuildInfo -{ - extern BASELIB_EXPORT const std::string build_timestamp; - - extern BASELIB_EXPORT const std::string cmake_cxx_compiler; - extern BASELIB_EXPORT const std::string cmake_cxx_flags; - extern BASELIB_EXPORT const std::string cmake_cxx_flags_release; - extern BASELIB_EXPORT const std::string cmake_cxx_flags_debug; - - extern BASELIB_EXPORT const std::string git_version_sha1; - extern BASELIB_EXPORT const std::string git_version_sha1_short; - - extern BASELIB_EXPORT const std::string ogs_version; - extern BASELIB_EXPORT const std::string cmake_args; - - extern BASELIB_EXPORT const std::string source_path; - extern BASELIB_EXPORT const std::string data_path; - extern BASELIB_EXPORT const std::string data_binary_path; - extern BASELIB_EXPORT const std::string tests_tmp_path; - } // namespace BuildInfo - } // namespace BaseLib diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index c64e2e4f39ab062e707f961ac82a7aa41741dc4b..462833dcfdb0d94c2dc7ac0c49e8cf2642cf5b0b 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -7,8 +7,6 @@ if(OGS_BUILD_GUI) append_source_files(SOURCES IO/XmlIO/Qt) endif() -list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h) - # Create the library add_library(BaseLib ${SOURCES}) if(BUILD_SHARED_LIBS) diff --git a/CMakeLists.txt b/CMakeLists.txt index efbc30c5324cd5dae4801c6c6102f3178f9e8025..0f5dc0e64c12a904eab951905b89db4fd92d0a9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -341,6 +341,7 @@ include(scripts/cmake/CheckHeaderCompilation.cmake) add_subdirectory(Applications) add_subdirectory(BaseLib) add_subdirectory(GeoLib) +add_subdirectory(InfoLib) add_subdirectory(MathLib) add_subdirectory(MeshLib) add_subdirectory(MeshGeoToolsLib) @@ -358,9 +359,6 @@ endif() file(WRITE ${PROJECT_BINARY_DIR}/disabled-tests.log "${DISABLED_TESTS_LOG}") unset(DISABLED_TESTS_LOG CACHE) # Don't write to CMakeCache.txt -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in" - "${CMAKE_CURRENT_BINARY_DIR}/BaseLib/BuildInfo.cpp" @ONLY) - check_header_compilation() include(scripts/cmake/MarkVariablesAdvanced.cmake) diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 83116584302a706726fb310cc225e7c5d86dc9e0..4423db81cea057aacb2bdaa441f167a84758e5e6 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -20,7 +20,6 @@ #include <logog/include/logog.hpp> -#include "BaseLib/BuildInfo.h" #include "BaseLib/FileFinder.h" #include "GeoLib/Triangle.h" diff --git a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp index 1b164185d464c5b1bc47487ca300474c8cf6a1f6..c4f06a84baea81a9c3a5cba27ac318637d065124 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp @@ -21,7 +21,6 @@ #include <RapidXML/rapidxml.hpp> #include <logog/include/logog.hpp> -#include "BaseLib/BuildInfo.h" #include "BaseLib/DateTools.h" #include "BaseLib/FileTools.h" #include "BaseLib/FileFinder.h" diff --git a/InfoLib/CMakeInfo.cpp.in b/InfoLib/CMakeInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..8adfce5d1a778f4baa78c4ff141e25cb1c8e23cd --- /dev/null +++ b/InfoLib/CMakeInfo.cpp.in @@ -0,0 +1,21 @@ +/** + * \brief CMake information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "InfoLib/CMakeInfo.h" + +namespace CMakeInfoLib +{ + +namespace CMakeInfo +{ + const std::string cmake_args("@CMAKE_ARGS_ESCAPED@"); +} +} diff --git a/InfoLib/CMakeInfo.h b/InfoLib/CMakeInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..31de88a0acc1ea75953b4385a6a84f417a55173c --- /dev/null +++ b/InfoLib/CMakeInfo.h @@ -0,0 +1,25 @@ +/** + * \brief CMake information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <string> + +#include "cmakeinfolib_export.h" + +namespace CMakeInfoLib +{ + +namespace CMakeInfo +{ + extern CMAKEINFOLIB_EXPORT const std::string cmake_args; +} // namespace +} // namespace diff --git a/InfoLib/CMakeLists.txt b/InfoLib/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..c785fccfa1282a22cdce8d5e91c3b9d5c22f9f28 --- /dev/null +++ b/InfoLib/CMakeLists.txt @@ -0,0 +1,11 @@ +foreach(lib Git CMake Test) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${lib}Info.cpp.in + ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp @ONLY) + + add_library(${lib}InfoLib ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp + ${lib}Info.h) + + include(GenerateExportHeader) + generate_export_header(${lib}InfoLib) + target_include_directories(${lib}InfoLib PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +endforeach(lib) diff --git a/InfoLib/GitInfo.cpp.in b/InfoLib/GitInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..2d3694384ab72de7dfa2e58d7004bf7a4812cfe7 --- /dev/null +++ b/InfoLib/GitInfo.cpp.in @@ -0,0 +1,22 @@ +/** + * \brief Git information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "InfoLib/GitInfo.h" + +namespace GitInfoLib +{ + +namespace GitInfo +{ + const std::string git_version_sha1_short("@GIT_SHA1_SHORT@"); + const std::string ogs_version("@OGS_VERSION@"); +} +} diff --git a/InfoLib/GitInfo.h b/InfoLib/GitInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..fbee43541c5027258dcf41871bd7afdf4ca25cfb --- /dev/null +++ b/InfoLib/GitInfo.h @@ -0,0 +1,26 @@ +/** + * \brief Git information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <string> + +#include "gitinfolib_export.h" + +namespace GitInfoLib +{ + +namespace GitInfo +{ + extern GITINFOLIB_EXPORT const std::string git_version_sha1_short; + extern GITINFOLIB_EXPORT const std::string ogs_version; +} // namespace +} // namespace diff --git a/InfoLib/TestInfo.cpp.in b/InfoLib/TestInfo.cpp.in new file mode 100644 index 0000000000000000000000000000000000000000..abef28b565b58be7ffcd8beb39bf76260adbc9aa --- /dev/null +++ b/InfoLib/TestInfo.cpp.in @@ -0,0 +1,22 @@ +/** + * \brief Test information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "InfoLib/TestInfo.h" + +namespace TestInfoLib +{ + +namespace TestInfo +{ + const std::string data_path("@Data_SOURCE_DIR@"); + const std::string tests_tmp_path("@PROJECT_BINARY_DIR@/Tests/"); +} +} diff --git a/InfoLib/TestInfo.h b/InfoLib/TestInfo.h new file mode 100644 index 0000000000000000000000000000000000000000..0ac030b02690c2c4de53505da025a18024cf1bef --- /dev/null +++ b/InfoLib/TestInfo.h @@ -0,0 +1,26 @@ +/** + * \brief Test information. + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <string> + +#include "testinfolib_export.h" + +namespace TestInfoLib +{ + +namespace TestInfo +{ + extern TESTINFOLIB_EXPORT const std::string data_path; + extern TESTINFOLIB_EXPORT const std::string tests_tmp_path; +} // namespace +} // namespace diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 893b163d52b3233bcc3c4c034765ec198c07f4fe..96919836805b4603fff570a0a9fecd0c2ffd7049 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -31,7 +31,7 @@ target_link_libraries(ProcessLib NumLib logog ChemistryLib - PRIVATE ParameterLib) + PRIVATE ParameterLib GitInfoLib) if(OGS_USE_PYTHON) add_subdirectory(BoundaryCondition/Python) diff --git a/ProcessLib/Output/ProcessOutput.cpp b/ProcessLib/Output/ProcessOutput.cpp index 327f412a0dac65e248f53d87a512e5260b32afac..a3cc1565754b8ec358acca73c7a26de5c3201502 100644 --- a/ProcessLib/Output/ProcessOutput.cpp +++ b/ProcessLib/Output/ProcessOutput.cpp @@ -9,7 +9,7 @@ #include "ProcessOutput.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "MathLib/LinAlg/LinAlg.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "NumLib/DOF/LocalToGlobalIndexMap.h" @@ -24,8 +24,8 @@ static void addOgsVersion(MeshLib::Mesh& mesh) auto& ogs_version_field = *MeshLib::getOrCreateMeshProperty<char>( mesh, "OGS_VERSION", MeshLib::MeshItemType::IntegrationPoint, 1); - ogs_version_field.assign(BaseLib::BuildInfo::ogs_version.begin(), - BaseLib::BuildInfo::ogs_version.end()); + ogs_version_field.assign(GitInfoLib::GitInfo::ogs_version.begin(), + GitInfoLib::GitInfo::ogs_version.end()); } static void addSecondaryVariableNodes( diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 502ea4d5571a69a5937298d9949f4aeeb99b5885..d08e3e753a06f075dfcf2874eba540434f972056 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -47,6 +47,7 @@ target_link_libraries(testrunner NumLib ParameterLib ProcessLib + TestInfoLib Threads::Threads ${VTK_LIBRARIES}) @@ -72,6 +73,7 @@ endif() if(OGS_BUILD_GUI) target_link_libraries(testrunner + GitInfoLib Qt5::Core Qt5::Gui Qt5::Xml diff --git a/Tests/FileIO/TestBoostGmlInterface.cpp b/Tests/FileIO/TestBoostGmlInterface.cpp index 8363fe5258547e5669ab6ee75350d12a43ec104d..e2fc545741636076b1d2139972de5c18a3b29abf 100644 --- a/Tests/FileIO/TestBoostGmlInterface.cpp +++ b/Tests/FileIO/TestBoostGmlInterface.cpp @@ -18,14 +18,14 @@ #include "Tests/FileIO/TestGmlInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" #include "GeoLib/GEOObjects.h" TEST_F(TestGmlInterface, BoostXmlGmlWriterReaderTest) { // Writer test - std::string test_data_file(BaseLib::BuildInfo::tests_tmp_path + std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path + "TestXmlGmlReader.gml"); GeoLib::IO::BoostXmlGmlInterface xml(geo_objects); diff --git a/Tests/FileIO/TestCsvReader.cpp b/Tests/FileIO/TestCsvReader.cpp index 2d36985717030c837e6ce0867138bb6380cc2078..166497a69d5a2dafef927917970f7b36eef2da57 100644 --- a/Tests/FileIO/TestCsvReader.cpp +++ b/Tests/FileIO/TestCsvReader.cpp @@ -16,7 +16,7 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/CsvInterface.h" #include "GeoLib/Point.h" @@ -24,7 +24,7 @@ class CsvInterfaceTest : public ::testing::Test { public: CsvInterfaceTest() - : _file_name(BaseLib::BuildInfo::tests_tmp_path+"test.csv") + : _file_name(TestInfoLib::TestInfo::tests_tmp_path+"test.csv") { std::ofstream out(_file_name); out << "id\tx\ty\tz\tname\tvalue1\tvalue_two\n"; diff --git a/Tests/FileIO/TestCsvWriter.cpp b/Tests/FileIO/TestCsvWriter.cpp index a27f5038a143f6ab1add8c45e750151c18873194..ce35532c4cc84d9068603548f18f9bbe5c4ff634 100644 --- a/Tests/FileIO/TestCsvWriter.cpp +++ b/Tests/FileIO/TestCsvWriter.cpp @@ -15,12 +15,12 @@ #include <string> #include <vector> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/CsvInterface.h" TEST(CsvWriter, WriteReadTest) { - std::string test_file(BaseLib::BuildInfo::tests_tmp_path + "TestData.csv"); + std::string test_file(TestInfoLib::TestInfo::tests_tmp_path + "TestData.csv"); std::vector<std::string> str_vec {"Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet" }; std::vector<int> int_vec { 1, 2, 4, 8, 16, 32, 64 }; diff --git a/Tests/FileIO/TestGmlInterface.h b/Tests/FileIO/TestGmlInterface.h index 3ecb41c5eedfdaa7baab5b77e5a2b1ce97f9760b..29f4387ec77e3591b86989f0f53956fa3a0afc57 100644 --- a/Tests/FileIO/TestGmlInterface.h +++ b/Tests/FileIO/TestGmlInterface.h @@ -16,8 +16,6 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" - #include "GeoLib/GEOObjects.h" #include "GeoLib/Polyline.h" #include "GeoLib/Triangle.h" diff --git a/Tests/FileIO/TestGmsInterface.cpp b/Tests/FileIO/TestGmsInterface.cpp index a56de29d6440a9fdc2238fb5acb3d8ff3b2c9af3..6ba2abb3f299c91e6c771401646528d486bacbe3 100644 --- a/Tests/FileIO/TestGmsInterface.cpp +++ b/Tests/FileIO/TestGmsInterface.cpp @@ -12,14 +12,14 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/GMSInterface.h" #include "MeshLib/Mesh.h" #include "MeshLib/MeshInformation.h" TEST(FileIO, TestGmsInterface) { - std::string const file_name (BaseLib::BuildInfo::data_path + "/FileIO/3DMeshData.3dm"); + std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/3DMeshData.3dm"); std::unique_ptr<MeshLib::Mesh> mesh (FileIO::GMSInterface::readGMS3DMMesh(file_name)); ASSERT_TRUE(mesh != nullptr); ASSERT_EQ(11795, mesh->getNumberOfNodes()); diff --git a/Tests/FileIO/TestTetGenInterface.cpp b/Tests/FileIO/TestTetGenInterface.cpp index 8d7a05db85bbb050ce8a6ea7aad79b4cf83872a8..2388a58085d34b3881b6958ee9f57abe22da9fa1 100644 --- a/Tests/FileIO/TestTetGenInterface.cpp +++ b/Tests/FileIO/TestTetGenInterface.cpp @@ -19,7 +19,7 @@ #include "gtest/gtest.h" #include "Applications/FileIO/TetGenInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "MeshLib/IO/readMeshFromFile.h" #include "GeoLib/GEOObjects.h" #include "MeshLib/Mesh.h" @@ -29,7 +29,7 @@ // read TetGen geometry TEST(FileIO, TetGenSmeshReader) { - std::string const file_name (BaseLib::BuildInfo::data_path + "/FileIO/twolayermdl.smesh"); + std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/twolayermdl.smesh"); GeoLib::GEOObjects geo_objects; FileIO::TetGenInterface tgi; bool const result (tgi.readTetGenGeometry(file_name, geo_objects)); @@ -50,11 +50,11 @@ TEST(FileIO, TetGenSmeshInterface) TEST(FileIO, DISABLED_TetGenSmeshInterface) #endif { - std::string const file_name (BaseLib::BuildInfo::data_path + "/FileIO/AmmerSubsurfaceCoarse.vtu"); + std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/AmmerSubsurfaceCoarse.vtu"); std::unique_ptr<MeshLib::Mesh const> const mesh (MeshLib::IO::readMeshFromFile(file_name)); std::string const tg_new_name ("TestSmeshWriter"); - std::string const output_name(BaseLib::BuildInfo::tests_tmp_path + tg_new_name + ".smesh"); + std::string const output_name(TestInfoLib::TestInfo::tests_tmp_path + tg_new_name + ".smesh"); std::vector<MeshLib::Node> attr_pnts; FileIO::TetGenInterface tgi; bool result (tgi.writeTetGenSmesh(output_name, *mesh, attr_pnts)); @@ -63,7 +63,7 @@ TEST(FileIO, DISABLED_TetGenSmeshInterface) GeoLib::GEOObjects geo_objects; result = tgi.readTetGenGeometry(output_name, geo_objects); ASSERT_TRUE(result); - std::string const ref_name(BaseLib::BuildInfo::data_path + "/FileIO/AmmerSubsurfaceCoarse.smesh"); + std::string const ref_name(TestInfoLib::TestInfo::data_path + "/FileIO/AmmerSubsurfaceCoarse.smesh"); result = tgi.readTetGenGeometry(ref_name, geo_objects); ASSERT_TRUE(result); @@ -87,8 +87,8 @@ TEST(FileIO, DISABLED_TetGenSmeshInterface) // TetGen mesh with material array TEST(FileIO, TetGenMeshReaderWithMaterials) { - std::string const node_name (BaseLib::BuildInfo::data_path + "/FileIO/twolayermdl.node"); - std::string const ele_name (BaseLib::BuildInfo::data_path + "/FileIO/twolayermdl.ele"); + std::string const node_name (TestInfoLib::TestInfo::data_path + "/FileIO/twolayermdl.node"); + std::string const ele_name (TestInfoLib::TestInfo::data_path + "/FileIO/twolayermdl.ele"); FileIO::TetGenInterface tgi; std::unique_ptr<MeshLib::Mesh> mesh (tgi.readTetGenMesh(node_name, ele_name)); ASSERT_TRUE(mesh != nullptr); @@ -105,8 +105,8 @@ TEST(FileIO, TetGenMeshReaderWithMaterials) // TetGen mesh without additional information TEST(FileIO, TetGenMeshReaderWithoutMaterials) { - std::string const node_name (BaseLib::BuildInfo::data_path + "/FileIO/tetgen_example.node"); - std::string const ele_name (BaseLib::BuildInfo::data_path + "/FileIO/tetgen_example.ele"); + std::string const node_name (TestInfoLib::TestInfo::data_path + "/FileIO/tetgen_example.node"); + std::string const ele_name (TestInfoLib::TestInfo::data_path + "/FileIO/tetgen_example.ele"); FileIO::TetGenInterface tgi; std::unique_ptr<MeshLib::Mesh> mesh (tgi.readTetGenMesh(node_name, ele_name)); ASSERT_TRUE(mesh != nullptr); diff --git a/Tests/FileIO_Qt/TestFEFLOWInterface.cpp b/Tests/FileIO_Qt/TestFEFLOWInterface.cpp index 8aa639895680047ffd3770245ea1e183c38c71f0..13faa1e93dd06dbfc3db1a376174309f93693fd2 100644 --- a/Tests/FileIO_Qt/TestFEFLOWInterface.cpp +++ b/Tests/FileIO_Qt/TestFEFLOWInterface.cpp @@ -13,7 +13,7 @@ #include <gtest/gtest.h> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/Mesh.h" @@ -23,7 +23,7 @@ TEST(FileIO, TestFEFLOWMeshInterface) { - std::string const file_name (BaseLib::BuildInfo::data_path + "/FileIO/small_cube_hex.fem"); + std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/small_cube_hex.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh(feflowIO.readFEFLOWFile(file_name)); @@ -45,7 +45,7 @@ TEST(FileIO, TestFEFLOWMeshInterface) TEST(FileIO, TestFEFLOWReadHexMesh) { - std::string const fname(BaseLib::BuildInfo::data_path + + std::string const fname(TestInfoLib::TestInfo::data_path + "/FileIO/FEFLOW/hex.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh( @@ -62,7 +62,7 @@ TEST(FileIO, TestFEFLOWReadHexMesh) TEST(FileIO, TestFEFLOWReadPrismMesh) { - std::string const fname(BaseLib::BuildInfo::data_path + + std::string const fname(TestInfoLib::TestInfo::data_path + "/FileIO/FEFLOW/prism.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh( @@ -79,7 +79,7 @@ TEST(FileIO, TestFEFLOWReadPrismMesh) TEST(FileIO, TestFEFLOWReadHexPrismMesh) { - std::string const fname(BaseLib::BuildInfo::data_path + + std::string const fname(TestInfoLib::TestInfo::data_path + "/FileIO/FEFLOW/hex_prism.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh( @@ -98,7 +98,7 @@ TEST(FileIO, TestFEFLOWReadHexPrismMesh) TEST(FileIO, TestFEFLOWReadTetMesh) { - std::string const fname(BaseLib::BuildInfo::data_path + + std::string const fname(TestInfoLib::TestInfo::data_path + "/FileIO/FEFLOW/tet.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh( @@ -115,7 +115,7 @@ TEST(FileIO, TestFEFLOWReadTetMesh) TEST(FileIO, TestFEFLOWReadPrismTetMesh) { - std::string const fname(BaseLib::BuildInfo::data_path + + std::string const fname(TestInfoLib::TestInfo::data_path + "/FileIO/FEFLOW/prism_tet.fem"); FileIO::FEFLOWMeshInterface feflowIO; std::unique_ptr<MeshLib::Mesh const> mesh( diff --git a/Tests/FileIO_Qt/TestQtGmlInterface.cpp b/Tests/FileIO_Qt/TestQtGmlInterface.cpp index 24883a8de546ac903e5f25c527380fe2b369cb70..29fd44843350d35afe63b275eb0845215d6ba7b4 100644 --- a/Tests/FileIO_Qt/TestQtGmlInterface.cpp +++ b/Tests/FileIO_Qt/TestQtGmlInterface.cpp @@ -18,14 +18,14 @@ #include "Tests/FileIO/TestGmlInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "GeoLib/GEOObjects.h" TEST_F(TestGmlInterface, QtXmlGmlWriterReaderTest) { // Writer test - std::string test_data_file(BaseLib::BuildInfo::tests_tmp_path + std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path + "TestXmlGmlReader.gml"); GeoLib::IO::XmlGmlInterface xml(geo_objects); diff --git a/Tests/FileIO_Qt/TestQtPrjInterface.cpp b/Tests/FileIO_Qt/TestQtPrjInterface.cpp index 1ef972835c23f9b74e076b672dce2df7bde9e2d5..768538bf3208b08e825747b3684596e5a11c5756 100644 --- a/Tests/FileIO_Qt/TestQtPrjInterface.cpp +++ b/Tests/FileIO_Qt/TestQtPrjInterface.cpp @@ -16,7 +16,7 @@ #include "Applications/DataHolderLib/Project.h" #include "Applications/DataHolderLib/SourceTerm.h" #include "Applications/FileIO/XmlIO/Qt/XmlPrjInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "GeoLib/GEOObjects.h" TEST(TestQtPrjInterface, QtXmlPrjReader) @@ -33,10 +33,10 @@ TEST(TestQtPrjInterface, QtXmlPrjReader) std::vector<TestParams> test_files; std::string name = - BaseLib::BuildInfo::data_path + + TestInfoLib::TestInfo::data_path + "/Elliptic/nonuniform_bc_Groundwaterflow/neumann_nonuniform.prj"; test_files.push_back({name, 0, 3, 2, 0}); - name = BaseLib::BuildInfo::data_path + + name = TestInfoLib::TestInfo::data_path + "/Elliptic/nonuniform_bc_Groundwaterflow/neumann_nonuniform.prj"; test_files.push_back({name, 0, 3, 2, 0}); diff --git a/Tests/FileIO_Qt/TestVtkRaster.cpp b/Tests/FileIO_Qt/TestVtkRaster.cpp index a5a8a1243b2546ce07759f257b146e3c14e5c0c7..9dd1f6d23b74e7fe5bb20e812a7597308632f6a9 100644 --- a/Tests/FileIO_Qt/TestVtkRaster.cpp +++ b/Tests/FileIO_Qt/TestVtkRaster.cpp @@ -19,12 +19,12 @@ #include "Applications/DataExplorer/VtkVis/VtkRaster.h" #include "Applications/FileIO/AsciiRasterInterface.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "GeoLib/Raster.h" TEST(TestVtkRaster, TestPNGReader) { - std::string name = BaseLib::BuildInfo::data_path + "/FileIO/testraster.png"; + std::string name = TestInfoLib::TestInfo::data_path + "/FileIO/testraster.png"; double x0; double y0; double delta; @@ -53,7 +53,7 @@ TEST(TestVtkRaster, TestPNGReader) TEST(TestVtkRaster, TestASCReader) { std::string name = - BaseLib::BuildInfo::data_path + "/MeshGeoToolsLib/Hamburg/00-raster.asc"; + TestInfoLib::TestInfo::data_path + "/MeshGeoToolsLib/Hamburg/00-raster.asc"; double x0; double y0; double delta; diff --git a/Tests/FileIO_SWMM/TestSwmmInterface.cpp b/Tests/FileIO_SWMM/TestSwmmInterface.cpp index e61bfeb35b92835ed711d8344ab02a2a83414d18..c47e56f638a5fd5365e2948aad130078b5d48dcd 100644 --- a/Tests/FileIO_SWMM/TestSwmmInterface.cpp +++ b/Tests/FileIO_SWMM/TestSwmmInterface.cpp @@ -12,7 +12,7 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/SWMM/SwmmInterface.h" #include "GeoLib/GeoObjects.h" #include "MeshLib/Mesh.h" @@ -21,7 +21,7 @@ TEST(FileIO, TestSwmmInterface) { std::string const base_name ("swmm_input_example"); - std::string const file_name (BaseLib::BuildInfo::data_path + "/FileIO/" + base_name + ".inp"); + std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/" + base_name + ".inp"); // testing geo conversion GeoLib::GEOObjects geo_objects; diff --git a/Tests/GeoLib/IO/TestGLIReader.cpp b/Tests/GeoLib/IO/TestGLIReader.cpp index 1c404804e6801ea9527dc06a99cf328300878bc9..32b277aa1846d701e3bbe4bb5948260cda6ebbb7 100644 --- a/Tests/GeoLib/IO/TestGLIReader.cpp +++ b/Tests/GeoLib/IO/TestGLIReader.cpp @@ -15,7 +15,7 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/Legacy/OGSIOVer4.h" #include "GeoLib/GEOObjects.h" @@ -23,7 +23,7 @@ class OGSIOVer4InterfaceTest : public ::testing::Test { public: OGSIOVer4InterfaceTest() - : _gli_fname(BaseLib::BuildInfo::tests_tmp_path+"test.gli") + : _gli_fname(TestInfoLib::TestInfo::tests_tmp_path+"test.gli") { std::ofstream gli_out(_gli_fname); gli_out << "#POINTS\n"; @@ -45,7 +45,7 @@ protected: TEST_F(OGSIOVer4InterfaceTest, SimpleTIN) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0 0.0 1.0 1.0\n"; @@ -69,7 +69,7 @@ TEST_F(OGSIOVer4InterfaceTest, SimpleTIN) TEST_F(OGSIOVer4InterfaceTest, StillCorrectTINWihtAdditionalValueAtEndOfLine) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0 10\n"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n"; @@ -93,7 +93,7 @@ TEST_F(OGSIOVer4InterfaceTest, StillCorrectTINWihtAdditionalValueAtEndOfLine) TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_ZeroAreaTri) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 0.0\n"; tin_out.close(); @@ -115,7 +115,7 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_ZeroAreaTri) TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_LineDoesNotStartWithID) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n"; tin_out << "a\n"; @@ -139,7 +139,7 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_LineDoesNotStartWithID) TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_PointIsMissing) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0\n"; @@ -161,7 +161,7 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_PointIsMissing) TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_CoordOfPointIsMissing) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0\n"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0\n"; @@ -183,7 +183,7 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_CoordOfPointIsMissing) TEST_F(OGSIOVer4InterfaceTest, SimpleTIN_AdditionalEmptyLinesAtEnd) { - std::string tin_fname(BaseLib::BuildInfo::tests_tmp_path+"Surface.tin"); + std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); std::ofstream tin_out (tin_fname); tin_out << "0 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0 10\n"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n\n\n"; diff --git a/Tests/GeoLib/TestPointToStationConversion.cpp b/Tests/GeoLib/TestPointToStationConversion.cpp index a258d1d5b9c466da9a820b358a40650a8b621e3c..8f9dd209a67254e16ae14f415b40295bfd8b36e8 100644 --- a/Tests/GeoLib/TestPointToStationConversion.cpp +++ b/Tests/GeoLib/TestPointToStationConversion.cpp @@ -10,14 +10,14 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "GeoLib/GEOObjects.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" TEST(GeoLib, PointToStationConversion) { std::string const file_name( - BaseLib::BuildInfo::data_path + + TestInfoLib::TestInfo::data_path + "/MeshGeoToolsLib/Hamburg/BrunnenGOK_Outline_ModellHH.gml"); GeoLib::GEOObjects geo_obj; GeoLib::IO::BoostXmlGmlInterface io(geo_obj); diff --git a/Tests/MathLib/TestGaussLegendreIntegration.cpp b/Tests/MathLib/TestGaussLegendreIntegration.cpp index ac061e9926a4533e6e07a0271d292723f373d570..c81a95926eef932d815cf5d1810035945843d3e8 100644 --- a/Tests/MathLib/TestGaussLegendreIntegration.cpp +++ b/Tests/MathLib/TestGaussLegendreIntegration.cpp @@ -11,7 +11,7 @@ #include <cmath> #include <limits> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "MathLib/Integration/GaussLegendreTet.h" @@ -450,7 +450,7 @@ static double const eps = 10 * std::numeric_limits<double>::epsilon(); OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreTet) { std::unique_ptr<MeshLib::Mesh> mesh_tet( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_tet.vtu")); for (unsigned integration_order : {1, 2, 3}) @@ -479,7 +479,7 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreTet) OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreHex) { std::unique_ptr<MeshLib::Mesh> mesh_hex( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_hex.vtu")); for (unsigned integration_order : {1, 2, 3}) @@ -511,7 +511,7 @@ OGS_DONT_TEST_THIS_IF_PETSC( MathLib, DISABLED_IntegrationGaussLegendreTetSeparablePolynomial) { std::unique_ptr<MeshLib::Mesh> mesh_tet( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_tet.vtu")); for (unsigned integration_order : {1, 2, 3}) @@ -539,7 +539,7 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreHexSeparablePolynomial) { std::unique_ptr<MeshLib::Mesh> mesh_hex( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_hex.vtu")); for (unsigned integration_order : {1, 2, 3, 4}) @@ -567,7 +567,7 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreTetNonSeparablePolynomial) { std::unique_ptr<MeshLib::Mesh> mesh_tet( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_tet.vtu")); for (unsigned integration_order : {1, 2, 3}) @@ -595,7 +595,7 @@ OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreHexNonSeparablePolynomial) { std::unique_ptr<MeshLib::Mesh> mesh_hex( - MeshLib::IO::VtuInterface::readVTUFile(BaseLib::BuildInfo::data_path + + MeshLib::IO::VtuInterface::readVTUFile(TestInfoLib::TestInfo::data_path + "/MathLib/unit_cube_hex.vtu")); for (unsigned integration_order : {1, 2, 3, 4}) diff --git a/Tests/MeshLib/TestRasterToMesh.cpp b/Tests/MeshLib/TestRasterToMesh.cpp index fc633bfb59f559d8514a9c5c01d5bc754c19d471..42424f97e250516051bef794d6f37f1fb9512814 100644 --- a/Tests/MeshLib/TestRasterToMesh.cpp +++ b/Tests/MeshLib/TestRasterToMesh.cpp @@ -13,7 +13,7 @@ #include "gtest/gtest.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "Applications/FileIO/AsciiRasterInterface.h" #include "GeoLib/Raster.h" @@ -34,7 +34,7 @@ class RasterToMeshTest : public ::testing::Test { public: RasterToMeshTest() - : _file_name(BaseLib::BuildInfo::data_path + "/MeshLib/testraster_selke.asc") + : _file_name(TestInfoLib::TestInfo::data_path + "/MeshLib/testraster_selke.asc") { _raster.reset(FileIO::AsciiRasterInterface::readRaster(_file_name)); } diff --git a/Tests/MeshLib/TestVtkMappedMeshSource.cpp b/Tests/MeshLib/TestVtkMappedMeshSource.cpp index 8974fb035a9f5837ef5569cdbf7bda89ad712b26..888330dd28e946a01b0f866a343d6740bad9f65d 100644 --- a/Tests/MeshLib/TestVtkMappedMeshSource.cpp +++ b/Tests/MeshLib/TestVtkMappedMeshSource.cpp @@ -12,7 +12,7 @@ * */ -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include <memory> #include <numeric> @@ -151,7 +151,7 @@ TEST_F(InSituMesh, DISABLED_MappedMeshSourceRoundtrip) // TODO Add more comparison criteria ASSERT_TRUE(mesh != nullptr); - std::string test_data_file(BaseLib::BuildInfo::tests_tmp_path + "/MappedMeshSourceRoundtrip.vtu"); + std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path + "/MappedMeshSourceRoundtrip.vtu"); // -- Test VtkMappedMeshSource, i.e. OGS mesh to VTK mesh vtkNew<MeshLib::VtkMappedMeshSource> vtkSource; diff --git a/Tests/NumLib/TestComponentNorms.cpp b/Tests/NumLib/TestComponentNorms.cpp index d6d1c30223a48e554730dcef3fc64452676e6a8e..b09ef5f0361c807d93e1f1306ebcc1c11f9aa5e5 100644 --- a/Tests/NumLib/TestComponentNorms.cpp +++ b/Tests/NumLib/TestComponentNorms.cpp @@ -12,7 +12,7 @@ #include <logog/include/logog.hpp> #ifdef USE_PETSC -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #endif #include "MathLib/LinAlg/LinAlg.h" #include "MathLib/LinAlg/MatrixSpecifications.h" @@ -45,7 +45,7 @@ struct DOFTableData NumLib::ComponentOrder const order) #ifdef USE_PETSC : mesh(MeshLib::IO::readMeshFromFile( - BaseLib::BuildInfo::data_path + + TestInfoLib::TestInfo::data_path + "/EllipticPETSc/quad_20x10_GroundWaterFlow.")), #else : mesh(MeshLib::MeshGenerator::generateRegularHexMesh( diff --git a/Tests/NumLib/TestODEInt.cpp b/Tests/NumLib/TestODEInt.cpp index 335b5faca35f32bf110429373f3e7cb5fca2a28f..75efc7d5b3d3b01376a0ca0d6a4025ecda572754 100644 --- a/Tests/NumLib/TestODEInt.cpp +++ b/Tests/NumLib/TestODEInt.cpp @@ -16,7 +16,7 @@ #include <logog/include/logog.hpp> #include <boost/property_tree/xml_parser.hpp> -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include "NumLib/NumericsConfig.h" #include "NumLib/ODESolver/ConvergenceCriterionDeltaX.h" #include "MathLib/LinAlg/LinAlg.h" diff --git a/Tests/testrunner.cpp b/Tests/testrunner.cpp index 8ea08406c875fe3fbbce36dabcc969cc159da80e..92ce6de48af80d6e5ab75e73ec535506256ca507 100644 --- a/Tests/testrunner.cpp +++ b/Tests/testrunner.cpp @@ -20,7 +20,6 @@ #include "Applications/ApplicationsLib/LogogSetup.h" #include "Applications/ApplicationsLib/LinearSolverLibrarySetup.h" #include "NumLib/DOF/GlobalMatrixProviders.h" -#include "BaseLib/BuildInfo.h" #include "BaseLib/TemplateLogogFormatterSuppressedGCC.h" #ifdef OGS_BUILD_GUI