From ab42cfbdf19db37e27e611791497566d16d87c13 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Tue, 20 Aug 2019 14:56:16 +0200 Subject: [PATCH 1/7] [BL] Removed build_timestamp. --- Applications/FileIO/Gmsh/GMSHInterface.cpp | 3 --- BaseLib/BuildInfo.cpp.in | 3 --- BaseLib/BuildInfo.h | 2 -- 3 files changed, 8 deletions(-) diff --git a/Applications/FileIO/Gmsh/GMSHInterface.cpp b/Applications/FileIO/Gmsh/GMSHInterface.cpp index 8b56c2eb60b..9be11b0ca9a 100644 --- a/Applications/FileIO/Gmsh/GMSHInterface.cpp +++ b/Applications/FileIO/Gmsh/GMSHInterface.cpp @@ -75,9 +75,6 @@ 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 << "\n\n"; return writeGMSHInputFile(_out) <= 0; diff --git a/BaseLib/BuildInfo.cpp.in b/BaseLib/BuildInfo.cpp.in index a6eb516b9d2..fb8ac40d3f6 100644 --- a/BaseLib/BuildInfo.cpp.in +++ b/BaseLib/BuildInfo.cpp.in @@ -16,9 +16,6 @@ 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@"); diff --git a/BaseLib/BuildInfo.h b/BaseLib/BuildInfo.h index 08e067764ae..e4e16a84235 100644 --- a/BaseLib/BuildInfo.h +++ b/BaseLib/BuildInfo.h @@ -20,8 +20,6 @@ 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; From 7bc653304cb1a840db2aae1caef296d5ba5d5241 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 09:13:19 +0200 Subject: [PATCH 2/7] Added InfoLib. --- InfoLib/CMakeInfo.cpp.in | 21 +++++++++++++++++++++ InfoLib/CMakeInfo.h | 25 +++++++++++++++++++++++++ InfoLib/CMakeLists.txt | 15 +++++++++++++++ InfoLib/CompilerInfo.cpp.in | 24 ++++++++++++++++++++++++ InfoLib/CompilerInfo.h | 28 ++++++++++++++++++++++++++++ InfoLib/GitInfo.cpp.in | 22 ++++++++++++++++++++++ InfoLib/GitInfo.h | 26 ++++++++++++++++++++++++++ InfoLib/TestInfo.cpp.in | 24 ++++++++++++++++++++++++ InfoLib/TestInfo.h | 28 ++++++++++++++++++++++++++++ 9 files changed, 213 insertions(+) create mode 100644 InfoLib/CMakeInfo.cpp.in create mode 100644 InfoLib/CMakeInfo.h create mode 100644 InfoLib/CMakeLists.txt create mode 100644 InfoLib/CompilerInfo.cpp.in create mode 100644 InfoLib/CompilerInfo.h create mode 100644 InfoLib/GitInfo.cpp.in create mode 100644 InfoLib/GitInfo.h create mode 100644 InfoLib/TestInfo.cpp.in create mode 100644 InfoLib/TestInfo.h diff --git a/InfoLib/CMakeInfo.cpp.in b/InfoLib/CMakeInfo.cpp.in new file mode 100644 index 00000000000..8adfce5d1a7 --- /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 00000000000..31de88a0acc --- /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 + +#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 00000000000..977a9f2aaea --- /dev/null +++ b/InfoLib/CMakeLists.txt @@ -0,0 +1,15 @@ +foreach(lib + Compiler + 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/CompilerInfo.cpp.in b/InfoLib/CompilerInfo.cpp.in new file mode 100644 index 00000000000..c290f27543c --- /dev/null +++ b/InfoLib/CompilerInfo.cpp.in @@ -0,0 +1,24 @@ +/** + * \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 "InfoLib/CompilerInfo.h" + +namespace CompilerInfoLib +{ + +namespace CompilerInfo +{ + 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@"); +} +} diff --git a/InfoLib/CompilerInfo.h b/InfoLib/CompilerInfo.h new file mode 100644 index 00000000000..96acfc0b7e8 --- /dev/null +++ b/InfoLib/CompilerInfo.h @@ -0,0 +1,28 @@ +/** + * \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 + +#include "compilerinfolib_export.h" + +namespace CompilerInfoLib +{ + +namespace CompilerInfo +{ + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_compiler; // all not used + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags; + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_release; + extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_debug; + } // namespace BuildInfo + } // namespace BaseLib diff --git a/InfoLib/GitInfo.cpp.in b/InfoLib/GitInfo.cpp.in new file mode 100644 index 00000000000..2d3694384ab --- /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 00000000000..fbee43541c5 --- /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 + +#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 00000000000..3d16ad2371a --- /dev/null +++ b/InfoLib/TestInfo.cpp.in @@ -0,0 +1,24 @@ +/** + * \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 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/InfoLib/TestInfo.h b/InfoLib/TestInfo.h new file mode 100644 index 00000000000..3461b354d00 --- /dev/null +++ b/InfoLib/TestInfo.h @@ -0,0 +1,28 @@ +/** + * \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 + +#include "testinfolib_export.h" + +namespace TestInfoLib +{ + +namespace TestInfo +{ + // extern INFOLIB_EXPORT const std::string source_path; // not used + extern TESTINFOLIB_EXPORT const std::string data_path; + // extern INFOLIB_EXPORT const std::string data_binary_path; // not used + extern TESTINFOLIB_EXPORT const std::string tests_tmp_path; +} // namespace +} // namespace From 5727dc9959084090444e6abca7d2ee7fd79dc7c8 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 09:14:45 +0200 Subject: [PATCH 3/7] Removed BuildInfo from BaseLib. --- BaseLib/BuildInfo.cpp.in | 36 ------------------------------------ BaseLib/BuildInfo.h | 39 --------------------------------------- BaseLib/CMakeLists.txt | 2 -- CMakeLists.txt | 4 +--- 4 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 BaseLib/BuildInfo.cpp.in delete mode 100644 BaseLib/BuildInfo.h diff --git a/BaseLib/BuildInfo.cpp.in b/BaseLib/BuildInfo.cpp.in deleted file mode 100644 index fb8ac40d3f6..00000000000 --- a/BaseLib/BuildInfo.cpp.in +++ /dev/null @@ -1,36 +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 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 e4e16a84235..00000000000 --- a/BaseLib/BuildInfo.h +++ /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 - * - */ - -#pragma once - -#include - -#include "baselib_export.h" - -namespace BaseLib -{ - -namespace BuildInfo -{ - 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 c64e2e4f39a..462833dcfdb 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 efbc30c5324..0f5dc0e64c1 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) From 43fa61889d274c3f5107be739035a52ebfa11663 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 09:18:55 +0200 Subject: [PATCH 4/7] Refactored Applications to use the InfoLibs. --- Applications/CLI/CMakeLists.txt | 3 +- Applications/CLI/ogs.cpp | 11 +- Applications/DataExplorer/DataExplorer.cmake | 1 + .../DataExplorer/VtkVis/VtkVisPipelineItem.h | 2 - Applications/DataExplorer/main.cpp | 6 +- Applications/DataExplorer/mainwindow.cpp | 6 +- Applications/FileIO/CMakeLists.txt | 2 +- Applications/FileIO/Gmsh/GMSHInterface.cpp | 4 +- .../FileIO/XmlIO/Qt/XmlNumInterface.cpp | 1 - .../FileIO/XmlIO/Qt/XmlPrjInterface.cpp | 1 - .../Utils/FileConverter/CMakeLists.txt | 100 ++++-------------- .../Utils/FileConverter/ConvertSHPToGLI.cpp | 6 +- .../Utils/FileConverter/FEFLOW2OGS.cpp | 6 +- Applications/Utils/FileConverter/GMSH2OGS.cpp | 6 +- ...ridReaderMain.cpp => GocadSGridReader.cpp} | 6 +- .../FileConverter/GocadTSurfaceReader.cpp | 6 +- .../{MeshToRaster.cpp => Mesh2Raster.cpp} | 6 +- Applications/Utils/FileConverter/OGS2VTK.cpp | 6 +- Applications/Utils/FileConverter/TIN2VTK.cpp | 6 +- .../Utils/FileConverter/TecPlotTools.cpp | 6 +- Applications/Utils/FileConverter/VTK2OGS.cpp | 6 +- Applications/Utils/FileConverter/VTK2TIN.cpp | 6 +- .../Utils/FileConverter/convertGEO.cpp | 6 +- .../generateMatPropsFromMatID.cpp | 6 +- Applications/Utils/GeoTools/CMakeLists.txt | 6 +- Applications/Utils/GeoTools/MoveGeometry.cpp | 6 +- .../Utils/GeoTools/TriangulatePolyline.cpp | 6 +- Applications/Utils/MeshEdit/AddTopLayer.cpp | 6 +- Applications/Utils/MeshEdit/CMakeLists.txt | 2 +- ...CreateBoundaryConditionsAlongPolylines.cpp | 6 +- .../Utils/MeshEdit/ExtractSurface.cpp | 6 +- .../MeshEdit/MapGeometryToMeshSurface.cpp | 6 +- Applications/Utils/MeshEdit/MoveMesh.cpp | 6 +- .../Utils/MeshEdit/NodeReordering.cpp | 6 +- .../ResetPropertiesInPolygonalRegion.cpp | 6 +- .../Utils/MeshEdit/UnityPreprocessing.cpp | 6 +- .../MeshEdit/appendLinesAlongPolyline.cpp | 6 +- Applications/Utils/MeshEdit/checkMesh.cpp | 6 +- .../Utils/MeshEdit/convertToLinearMesh.cpp | 6 +- .../MeshEdit/createLayeredMeshFromRasters.cpp | 6 +- .../Utils/MeshEdit/createQuadraticMesh.cpp | 6 +- .../Utils/MeshEdit/editMaterialID.cpp | 6 +- Applications/Utils/MeshEdit/moveMeshNodes.cpp | 2 +- Applications/Utils/MeshEdit/queryMesh.cpp | 6 +- .../Utils/MeshEdit/removeMeshElements.cpp | 6 +- Applications/Utils/MeshEdit/reviseMesh.cpp | 6 +- .../Utils/MeshEdit/swapNodeCoordinateAxes.cpp | 6 +- .../Utils/MeshGeoTools/CMakeLists.txt | 6 +- ...computeSurfaceNodeIDsInPolygonalRegion.cpp | 6 +- .../constructMeshesFromGeometry.cpp | 6 +- .../Utils/MeshGeoTools/identifySubdomains.cpp | 6 +- .../Utils/ModelPreparation/CMakeLists.txt | 2 +- .../ComputeNodeAreasFromSurfaceMesh.cpp | 6 +- .../PartitionMesh/CMakeLists.txt | 2 +- .../PartitionMesh/PartitionMesh.cpp | 6 +- .../convertVtkDataArrayToVtkDataArray.cpp | 6 +- .../ModelPreparation/createNeumannBc.cpp | 6 +- .../Utils/ModelPreparation/scaleProperty.cpp | 6 +- .../Utils/OGSFileConverter/CMakeLists.txt | 2 +- Applications/Utils/OGSFileConverter/main.cpp | 6 +- .../Utils/PostProcessing/CMakeLists.txt | 2 +- Applications/Utils/PostProcessing/postLIE.cpp | 6 +- .../Utils/SWMMConverter/CMakeLists.txt | 1 + .../Utils/SWMMConverter/SWMMConverter.cpp | 6 +- .../Utils/SimpleMeshCreation/CMakeLists.txt | 24 ++--- .../createMeshElemPropertiesFromASCRaster.cpp | 6 +- .../generateStructuredMesh.cpp | 6 +- 67 files changed, 204 insertions(+), 258 deletions(-) rename Applications/Utils/FileConverter/{GocadSGridReaderMain.cpp => GocadSGridReader.cpp} (96%) rename Applications/Utils/FileConverter/{MeshToRaster.cpp => Mesh2Raster.cpp} (98%) diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index bb8917b3288..f7f1be9afc5 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 6ed80a84731..3dbb95bfb62 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 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 96264714217..7e26c6f5aca 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 5dee06afd9f..2cb9fc71ada 100644 --- a/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h +++ b/Applications/DataExplorer/VtkVis/VtkVisPipelineItem.h @@ -19,8 +19,6 @@ #include #include -#include "BaseLib/BuildInfo.h" - #include "TreeItem.h" class QStringList; diff --git a/Applications/DataExplorer/main.cpp b/Applications/DataExplorer/main.cpp index 80f8195fda7..512f4a9075a 100644 --- a/Applications/DataExplorer/main.cpp +++ b/Applications/DataExplorer/main.cpp @@ -15,7 +15,7 @@ FbxScene* lScene = nullptr; #include -#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(); 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 4c50cf002ae..850e433f7a3 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("www.opengeosys.org

"); about.append(QString("Version: %1
") - .arg(QString::fromStdString(BaseLib::BuildInfo::ogs_version))); + .arg(QString::fromStdString(GitInfoLib::GitInfo::ogs_version))); about.append(QString("Git commit: %1
") - .arg(QString::fromStdString(BaseLib::BuildInfo::git_version_sha1_short))); + .arg(QString::fromStdString(GitInfoLib::GitInfo::git_version_sha1_short))); about.append(QString("Built date: %1
").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 95d05766e94..d8fd5e927cd 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 9be11b0ca9a..9d895237ae3 100644 --- a/Applications/FileIO/Gmsh/GMSHInterface.cpp +++ b/Applications/FileIO/Gmsh/GMSHInterface.cpp @@ -13,7 +13,7 @@ #include -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include "BaseLib/FileTools.h" #include "Applications/FileIO/Gmsh/GMSHInterface.h" @@ -74,7 +74,7 @@ GMSHInterface::~GMSHInterface() bool GMSHInterface::write() { - _out << "// GMSH input file created by OpenGeoSys " << BaseLib::BuildInfo::ogs_version; + _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 90eae86f66f..41d7db90505 100644 --- a/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp +++ b/Applications/FileIO/XmlIO/Qt/XmlNumInterface.cpp @@ -20,7 +20,6 @@ #include -#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 008d1d71178..cf171223a7a 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 fdced981ac1..ae8eceb3284 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 5bbe450b464..e1d5e66fdeb 100644 --- a/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp +++ b/Applications/Utils/FileConverter/ConvertSHPToGLI.cpp @@ -22,7 +22,7 @@ #include #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 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 0854d0a68cf..d580218ea35 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 ogs_mesh_arg( "o", diff --git a/Applications/Utils/FileConverter/GMSH2OGS.cpp b/Applications/Utils/FileConverter/GMSH2OGS.cpp index 56298eb6e46..00190016c1d 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 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 005c18104c5..be15da95ca4 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 face_set_arg( "f", "generate-face-sets", diff --git a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp index bd549fbf039..0aa14a89fed 100644 --- a/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp +++ b/Applications/Utils/FileConverter/GocadTSurfaceReader.cpp @@ -9,7 +9,7 @@ #include -#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 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 355f5ddd1c2..ca23613bb8d 100644 --- a/Applications/Utils/FileConverter/MeshToRaster.cpp +++ b/Applications/Utils/FileConverter/Mesh2Raster.cpp @@ -14,7 +14,7 @@ #include #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 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 fddf988cccc..b76ab8e32eb 100644 --- a/Applications/Utils/FileConverter/OGS2VTK.cpp +++ b/Applications/Utils/FileConverter/OGS2VTK.cpp @@ -17,7 +17,7 @@ #include #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 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 966e64440ea..4a0c003c91d 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 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 38bcb238f09..d07e5286eca 100644 --- a/Applications/Utils/FileConverter/TecPlotTools.cpp +++ b/Applications/Utils/FileConverter/TecPlotTools.cpp @@ -16,7 +16,7 @@ #include -#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 input_arg("i", "input-file", "TecPlot input file", true, "", "string"); cmd.add(input_arg); TCLAP::ValueArg 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 67f373f6937..01e64345de3 100644 --- a/Applications/Utils/FileConverter/VTK2OGS.cpp +++ b/Applications/Utils/FileConverter/VTK2OGS.cpp @@ -17,7 +17,7 @@ #include #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 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 6877836c58f..9488d6d366e 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 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 3353a0b0098..05e2cdb07cf 100644 --- a/Applications/Utils/FileConverter/convertGEO.cpp +++ b/Applications/Utils/FileConverter/convertGEO.cpp @@ -12,7 +12,7 @@ #include -#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 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 a5ce5361242..4ab4b09e3b0 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 mesh_arg("m", "mesh", diff --git a/Applications/Utils/GeoTools/CMakeLists.txt b/Applications/Utils/GeoTools/CMakeLists.txt index a721629a0e4..d925823fca5 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 fe74c076c33..2a1b3813b8e 100644 --- a/Applications/Utils/GeoTools/MoveGeometry.cpp +++ b/Applications/Utils/GeoTools/MoveGeometry.cpp @@ -15,7 +15,7 @@ #include #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 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 66ea4231c0a..4cbeb341a39 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 input_arg("i", "input", "GML input file (*.gml)", true, "", "string"); TCLAP::ValueArg output_arg("o", "output", "GML output file (*.gml)", true, "", "string"); TCLAP::ValueArg 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 47f3d119a97..eff5dfcf69b 100644 --- a/Applications/Utils/MeshEdit/AddTopLayer.cpp +++ b/Applications/Utils/MeshEdit/AddTopLayer.cpp @@ -14,7 +14,7 @@ #include #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 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 780ee023752..ea9bef3f1b6 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 30cfb059bc6..95740a623d2 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 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 ef7e3787c02..085482675f3 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 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 79aa2fbc544..fc5f1748efe 100644 --- a/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp +++ b/Applications/Utils/MeshEdit/MapGeometryToMeshSurface.cpp @@ -15,7 +15,7 @@ #include #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 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 3130ad8ffef..de36e160199 100644 --- a/Applications/Utils/MeshEdit/MoveMesh.cpp +++ b/Applications/Utils/MeshEdit/MoveMesh.cpp @@ -13,7 +13,7 @@ #include #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 db72cda1060..9042ac59c69 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 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 18102c33a36..d59d1859137 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 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 150b7bf340e..1b09dbced85 100644 --- a/Applications/Utils/MeshEdit/UnityPreprocessing.cpp +++ b/Applications/Utils/MeshEdit/UnityPreprocessing.cpp @@ -12,7 +12,7 @@ #include #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 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 91586584edf..e751ea1eaa8 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 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 462abd7bbb7..7b960990ce6 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 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 ab5eb03dc1e..fe2979f9403 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 input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg 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 016b49fa6c5..01848ea800b 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 mesh_arg( "i", "input-mesh-file", diff --git a/Applications/Utils/MeshEdit/createQuadraticMesh.cpp b/Applications/Utils/MeshEdit/createQuadraticMesh.cpp index 94f29ca944a..756cada3ccd 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 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 4db9b383fb5..329787dfb4a 100644 --- a/Applications/Utils/MeshEdit/editMaterialID.cpp +++ b/Applications/Utils/MeshEdit/editMaterialID.cpp @@ -11,7 +11,7 @@ #include #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 e485983a2ff..4b6f531a1b3 100644 --- a/Applications/Utils/MeshEdit/moveMeshNodes.cpp +++ b/Applications/Utils/MeshEdit/moveMeshNodes.cpp @@ -13,7 +13,7 @@ #include #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 ccdec0b80da..12d392ff086 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 mesh_arg("mesh-file","input mesh file",true,"","string"); cmd.add( mesh_arg ); TCLAP::MultiArg eleId_arg("e","element-id","element ID",false,"number"); diff --git a/Applications/Utils/MeshEdit/removeMeshElements.cpp b/Applications/Utils/MeshEdit/removeMeshElements.cpp index d6f275078b2..675c0d346d4 100644 --- a/Applications/Utils/MeshEdit/removeMeshElements.cpp +++ b/Applications/Utils/MeshEdit/removeMeshElements.cpp @@ -16,7 +16,7 @@ #include #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 zLargeArg("", "z-max", "largest allowed extent in z-dimension", diff --git a/Applications/Utils/MeshEdit/reviseMesh.cpp b/Applications/Utils/MeshEdit/reviseMesh.cpp index beef0654bb4..052283c2c11 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 input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg 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 d91cd3a780d..ec8f064f0b7 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 input_arg("i", "input-mesh-file","input mesh file",true,"","string"); cmd.add( input_arg ); TCLAP::ValueArg 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 c5b69d1e445..98082d85863 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 17c016a7fd2..59f9b4b6b39 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 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 d370b79c999..d4d5ebdc6b5 100644 --- a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp +++ b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp @@ -10,7 +10,7 @@ #include #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 search_length_arg( "s", diff --git a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp index c2e37653209..7d45bfad7bc 100644 --- a/Applications/Utils/MeshGeoTools/identifySubdomains.cpp +++ b/Applications/Utils/MeshGeoTools/identifySubdomains.cpp @@ -10,7 +10,7 @@ #include #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 force_overwrite_arg( "f", diff --git a/Applications/Utils/ModelPreparation/CMakeLists.txt b/Applications/Utils/ModelPreparation/CMakeLists.txt index 2433d9ab5f6..683b6ebf448 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 654f30bb721..a0124c85988 100644 --- a/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp +++ b/Applications/Utils/ModelPreparation/ComputeNodeAreasFromSurfaceMesh.cpp @@ -17,7 +17,7 @@ #include #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 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 332cc069651..44b852e052c 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 5f654178911..a492768148f 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 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 613c48c1318..1dd355c64bc 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 new_property_data_type_arg( "t", diff --git a/Applications/Utils/ModelPreparation/createNeumannBc.cpp b/Applications/Utils/ModelPreparation/createNeumannBc.cpp index ae36ccec620..44b2ac2cce2 100644 --- a/Applications/Utils/ModelPreparation/createNeumannBc.cpp +++ b/Applications/Utils/ModelPreparation/createNeumannBc.cpp @@ -11,7 +11,7 @@ #include #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 in_mesh("i", "in-mesh", diff --git a/Applications/Utils/ModelPreparation/scaleProperty.cpp b/Applications/Utils/ModelPreparation/scaleProperty.cpp index aad6f5437f1..6dc346ce799 100644 --- a/Applications/Utils/ModelPreparation/scaleProperty.cpp +++ b/Applications/Utils/ModelPreparation/scaleProperty.cpp @@ -16,7 +16,7 @@ #include #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 out_mesh_arg( "o", diff --git a/Applications/Utils/OGSFileConverter/CMakeLists.txt b/Applications/Utils/OGSFileConverter/CMakeLists.txt index ec758b6a05f..8fca073290d 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 796ab01b539..128f34be067 100644 --- a/Applications/Utils/OGSFileConverter/main.cpp +++ b/Applications/Utils/OGSFileConverter/main.cpp @@ -14,7 +14,7 @@ #include #include "Applications/ApplicationsLib/LogogSetup.h" -#include "BaseLib/BuildInfo.h" +#include "InfoLib/GitInfo.h" #include @@ -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 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 52469fed16d..f35da2417d0 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 fe9cc2babc9..0d62eb67a61 100644 --- a/Applications/Utils/PostProcessing/postLIE.cpp +++ b/Applications/Utils/PostProcessing/postLIE.cpp @@ -16,7 +16,7 @@ #include #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 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 1b78a128bc8..77f9e68a993 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 dae12ad9bb6..9be488ba1e4 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 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 91562281a1b..ebef70b4a16 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 422f287e995..3824852a840 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 out_mesh_arg( "o", diff --git a/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp b/Applications/Utils/SimpleMeshCreation/generateStructuredMesh.cpp index 719a4c1a213..555983456ec 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(); cmd.setOutput(tclapOutput.get()); From 86017926af1a62d8ed985a9c66cb384b7347c070 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 09:19:28 +0200 Subject: [PATCH 5/7] Refactored Tests to use the InfoLibs. --- Tests/CMakeLists.txt | 2 ++ Tests/FileIO/TestBoostGmlInterface.cpp | 4 ++-- Tests/FileIO/TestCsvReader.cpp | 4 ++-- Tests/FileIO/TestCsvWriter.cpp | 4 ++-- Tests/FileIO/TestGmlInterface.h | 2 -- Tests/FileIO/TestGmsInterface.cpp | 4 ++-- Tests/FileIO/TestTetGenInterface.cpp | 18 +++++++++--------- Tests/FileIO_Qt/TestFEFLOWInterface.cpp | 14 +++++++------- Tests/FileIO_Qt/TestQtGmlInterface.cpp | 4 ++-- Tests/FileIO_Qt/TestQtPrjInterface.cpp | 6 +++--- Tests/FileIO_Qt/TestVtkRaster.cpp | 6 +++--- Tests/FileIO_SWMM/TestSwmmInterface.cpp | 4 ++-- Tests/GeoLib/IO/TestGLIReader.cpp | 18 +++++++++--------- Tests/GeoLib/TestPointToStationConversion.cpp | 4 ++-- Tests/MathLib/TestGaussLegendreIntegration.cpp | 14 +++++++------- Tests/MeshLib/TestRasterToMesh.cpp | 4 ++-- Tests/MeshLib/TestVtkMappedMeshSource.cpp | 4 ++-- Tests/NumLib/TestComponentNorms.cpp | 4 ++-- Tests/NumLib/TestODEInt.cpp | 2 +- Tests/testrunner.cpp | 1 - 20 files changed, 61 insertions(+), 62 deletions(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 502ea4d5571..d08e3e753a0 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 8363fe52585..e2fc5457416 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 2d369857170..166497a69d5 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 a27f5038a14..ce35532c4cc 100644 --- a/Tests/FileIO/TestCsvWriter.cpp +++ b/Tests/FileIO/TestCsvWriter.cpp @@ -15,12 +15,12 @@ #include #include -#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 str_vec {"Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet" }; std::vector int_vec { 1, 2, 4, 8, 16, 32, 64 }; diff --git a/Tests/FileIO/TestGmlInterface.h b/Tests/FileIO/TestGmlInterface.h index 3ecb41c5eed..29f4387ec77 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 a56de29d644..6ba2abb3f29 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 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 8d7a05db85b..2388a58085d 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 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 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 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 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 8aa63989568..13faa1e93dd 100644 --- a/Tests/FileIO_Qt/TestFEFLOWInterface.cpp +++ b/Tests/FileIO_Qt/TestFEFLOWInterface.cpp @@ -13,7 +13,7 @@ #include -#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 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 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 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 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 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 mesh( diff --git a/Tests/FileIO_Qt/TestQtGmlInterface.cpp b/Tests/FileIO_Qt/TestQtGmlInterface.cpp index 24883a8de54..29fd4484335 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 1ef972835c2..768538bf320 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 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 a5a8a1243b2..9dd1f6d23b7 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 e61bfeb35b9..c47e56f638a 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 1c404804e68..32b277aa184 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 @@ class OGSIOVer4InterfaceTest : public ::testing::Test 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 a258d1d5b9c..8f9dd209a67 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 ac061e9926a..c81a95926ee 100644 --- a/Tests/MathLib/TestGaussLegendreIntegration.cpp +++ b/Tests/MathLib/TestGaussLegendreIntegration.cpp @@ -11,7 +11,7 @@ #include #include -#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::epsilon(); OGS_DONT_TEST_THIS_IF_PETSC(MathLib, IntegrationGaussLegendreTet) { std::unique_ptr 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 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 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 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 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 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 fc633bfb59f..42424f97e25 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 8974fb035a9..888330dd28e 100644 --- a/Tests/MeshLib/TestVtkMappedMeshSource.cpp +++ b/Tests/MeshLib/TestVtkMappedMeshSource.cpp @@ -12,7 +12,7 @@ * */ -#include "BaseLib/BuildInfo.h" +#include "InfoLib/TestInfo.h" #include #include @@ -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 vtkSource; diff --git a/Tests/NumLib/TestComponentNorms.cpp b/Tests/NumLib/TestComponentNorms.cpp index d6d1c30223a..b09ef5f0361 100644 --- a/Tests/NumLib/TestComponentNorms.cpp +++ b/Tests/NumLib/TestComponentNorms.cpp @@ -12,7 +12,7 @@ #include #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 335b5faca35..75efc7d5b3d 100644 --- a/Tests/NumLib/TestODEInt.cpp +++ b/Tests/NumLib/TestODEInt.cpp @@ -16,7 +16,7 @@ #include #include -#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 8ea08406c87..92ce6de48af 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 From 7afb78e76b22a7f88aaf49a7fe0c1c143f82b23e Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 09:20:53 +0200 Subject: [PATCH 6/7] Refactored GeoLib and ProcessLib to use the InfoLibs. --- GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp | 1 - GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp | 1 - ProcessLib/CMakeLists.txt | 2 +- ProcessLib/Output/ProcessOutput.cpp | 6 +++--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 83116584302..4423db81cea 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -20,7 +20,6 @@ #include -#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 1b164185d46..c4f06a84bae 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlStnInterface.cpp @@ -21,7 +21,6 @@ #include #include -#include "BaseLib/BuildInfo.h" #include "BaseLib/DateTools.h" #include "BaseLib/FileTools.h" #include "BaseLib/FileFinder.h" diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 893b163d52b..96919836805 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 327f412a0da..a3cc1565754 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( 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( From 0905b5ea30895ff4175ea602b22287ce08b5dfdf Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Wed, 21 Aug 2019 13:39:31 +0200 Subject: [PATCH 7/7] Dropped unused variables from InfoLibs --- InfoLib/CMakeLists.txt | 6 +----- InfoLib/CompilerInfo.cpp.in | 24 ------------------------ InfoLib/CompilerInfo.h | 28 ---------------------------- InfoLib/TestInfo.cpp.in | 2 -- InfoLib/TestInfo.h | 2 -- 5 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 InfoLib/CompilerInfo.cpp.in delete mode 100644 InfoLib/CompilerInfo.h diff --git a/InfoLib/CMakeLists.txt b/InfoLib/CMakeLists.txt index 977a9f2aaea..c785fccfa12 100644 --- a/InfoLib/CMakeLists.txt +++ b/InfoLib/CMakeLists.txt @@ -1,8 +1,4 @@ -foreach(lib - Compiler - Git - CMake - Test) +foreach(lib Git CMake Test) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${lib}Info.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${lib}Info.cpp @ONLY) diff --git a/InfoLib/CompilerInfo.cpp.in b/InfoLib/CompilerInfo.cpp.in deleted file mode 100644 index c290f27543c..00000000000 --- a/InfoLib/CompilerInfo.cpp.in +++ /dev/null @@ -1,24 +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 "InfoLib/CompilerInfo.h" - -namespace CompilerInfoLib -{ - -namespace CompilerInfo -{ - 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@"); -} -} diff --git a/InfoLib/CompilerInfo.h b/InfoLib/CompilerInfo.h deleted file mode 100644 index 96acfc0b7e8..00000000000 --- a/InfoLib/CompilerInfo.h +++ /dev/null @@ -1,28 +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 - -#include "compilerinfolib_export.h" - -namespace CompilerInfoLib -{ - -namespace CompilerInfo -{ - extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_compiler; // all not used - extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags; - extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_release; - extern COMPILERINFOLIB_EXPORT const std::string cmake_cxx_flags_debug; - } // namespace BuildInfo - } // namespace BaseLib diff --git a/InfoLib/TestInfo.cpp.in b/InfoLib/TestInfo.cpp.in index 3d16ad2371a..abef28b565b 100644 --- a/InfoLib/TestInfo.cpp.in +++ b/InfoLib/TestInfo.cpp.in @@ -16,9 +16,7 @@ namespace TestInfoLib namespace TestInfo { - // 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/InfoLib/TestInfo.h b/InfoLib/TestInfo.h index 3461b354d00..0ac030b0269 100644 --- a/InfoLib/TestInfo.h +++ b/InfoLib/TestInfo.h @@ -20,9 +20,7 @@ namespace TestInfoLib namespace TestInfo { - // extern INFOLIB_EXPORT const std::string source_path; // not used extern TESTINFOLIB_EXPORT const std::string data_path; - // extern INFOLIB_EXPORT const std::string data_binary_path; // not used extern TESTINFOLIB_EXPORT const std::string tests_tmp_path; } // namespace } // namespace