diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index 49f077b1ff81be529b9e5c23960a553d4f02748d..b20709fdb1124f8d0a62acc65729cf8d524c5faf 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries(ApplicationsLib foreach(process ${ProcessesList}) if(OGS_BUILD_PROCESS_${process}) string(TOUPPER "OGS_BUILD_PROCESS_${process}" EnableProcess) - set_property(SOURCE ProjectData.cpp + set_property(TARGET ApplicationsLib APPEND PROPERTY COMPILE_DEFINITIONS ${EnableProcess}) endif() diff --git a/Applications/DataExplorer/CMakeLists.txt b/Applications/DataExplorer/CMakeLists.txt index 2e991908d77c4314989549733d450f1b67e25c80..82400d0e79ab20ac49e59eb71e8a8f75c1148c1a 100644 --- a/Applications/DataExplorer/CMakeLists.txt +++ b/Applications/DataExplorer/CMakeLists.txt @@ -1,8 +1,3 @@ -set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}") -# Always built Data Explorer statically as there are cyclic dependencies between -# QtDataView and VtkVis -set(BUILD_SHARED_LIBS OFF) - if(MSVC) add_definitions(-DVTKGUISUPPORTQT_STATIC_DEFINE) endif() @@ -24,5 +19,3 @@ add_subdirectory(DataView) add_subdirectory(DataView/DiagramView) add_subdirectory(VtkVis) include(DataExplorer.cmake) - -set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}") diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index 32c30d3cf0d0b690c0c1e757e36eff4c073f1324..e67925f37bc30495f26245a795161e82aeac6416 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -53,12 +53,6 @@ target_link_libraries(DataExplorer ${VTK_LIBRARIES} ) - -if(OGS_USE_NETCDF) - add_subdirectory(NetCdfDialog) - target_link_libraries(DataExplorer NetCdfDialogLib) -endif() - if(NOT APPLE AND OGS_USE_CONAN) if(UNIX) target_link_libraries(DataExplorer Qt5::X11Extras) diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt index 11b6e866ad8b74c3584f28a537b9aef3c8ee0eab..8b65bdcea6c985712abdb95146aeb2e721f0f9d7 100644 --- a/Applications/DataExplorer/DataView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/CMakeLists.txt @@ -121,7 +121,7 @@ if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) endif() # GEOTIFF_FOUND -ogs_add_library(QtDataView ${SOURCES} ${HEADERS} ${UIS}) +ogs_add_library(QtDataView STATIC ${SOURCES} ${HEADERS} ${UIS}) target_link_libraries(QtDataView PUBLIC GeoLib diff --git a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt b/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt deleted file mode 100644 index 79faf9ddb48ce57bbd89b3b1ea58e74bd0339e70..0000000000000000000000000000000000000000 --- a/Applications/DataExplorer/NetCdfDialog/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -ogs_add_library(NetCdfDialogLib NetCdfConfigureDialog.cpp NetCdfConfigureDialog.h) -target_link_libraries(NetCdfDialogLib - PUBLIC Qt5::Widgets - ${NETCDF_LIBRARIES_CXX} - ${NETCDF_LIBRARIES_C} - ${HDF5_HL_LIBRARIES} - ${HDF5_LIBRARIES} - PRIVATE MathLib) -if(OGS_USE_CONAN AND MSVC) - target_link_libraries(NetCdfDialogLib PUBLIC ${CONAN_LIBS}) -endif() -set_property(TARGET NetCdfDialogLib PROPERTY FOLDER "DataExplorer") - -# Workaround for system installed VTK (tested on arch) -if(NOT OGS_USE_CONAN) - target_include_directories(NetCdfDialogLib SYSTEM - PUBLIC ${NETCDF_INCLUDES_C} - PUBLIC ${NETCDF_INCLUDES_CXX}) -endif() - -add_autogen_include(NetCdfDialogLib) diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index 35580d426424094c010f787c2bd06e7c5039c647..57815c579026788f6c8b77726da7ac8058dc5ca3 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -98,12 +98,21 @@ set(HEADERS VtkVisPointSetItem.h VtkVisTabWidget.h) +set(UIS + MeshFromRaster.ui VisPrefs.ui VisualizationWidgetBase.ui + VtkAddFilterDialogBase.ui VtkVisTabWidgetBase.ui) + +if(OGS_USE_NETCDF) + set(SOURCES ${SOURCES} NetCdfConfigureDialog.h NetCdfConfigureDialog.cpp) + set(UIS ${UIS} NetCdfConfigure.ui) +endif() + # Visual Studio folder source_group("Filter Header Files" REGULAR_EXPRESSION "[.]*Filter.h") source_group("Filter Source Files" REGULAR_EXPRESSION "[.]*Filter.cpp") source_group("Source Header Files" REGULAR_EXPRESSION "[.]*Source.h") source_group("Source Source Files" REGULAR_EXPRESSION "[.]*Source.cpp") -file(GLOB_RECURSE UIS CONFIGURE_DEPENDS *.ui) + source_group("UI Files" FILES ${UIS}) set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../..) @@ -119,11 +128,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${GUI_SOURCE_DIR_REL}/DataView ${GUI_SOURCE_DIR_REL}/VtkModules/Qt) -ogs_add_library(VtkVis ${SOURCES} ${HEADERS} ${UIS}) +ogs_add_library(VtkVis STATIC ${SOURCES} ${HEADERS} ${UIS}) if(GEOTIFF_FOUND) include_directories(${GEOTIFF_INCLUDE_DIRS}) - target_link_libraries(VtkVis INTERFACE ${GEOTIFF_LIBRARIES}) + target_link_libraries(VtkVis PUBLIC ${GEOTIFF_LIBRARIES}) endif() # GEOTIFF_FOUND target_link_libraries(VtkVis @@ -136,7 +145,20 @@ target_link_libraries(VtkVis PRIVATE MathLib ApplicationsFileIO Qt5::Gui logog) if(OGS_USE_NETCDF) - target_link_libraries(VtkVis PRIVATE NetCdfDialogLib) + target_link_libraries(VtkVis + PUBLIC ${NETCDF_LIBRARIES_CXX} + ${NETCDF_LIBRARIES_C} + ${HDF5_HL_LIBRARIES} + ${HDF5_LIBRARIES}) + if(OGS_USE_CONAN AND MSVC) + target_link_libraries(VtkVis PUBLIC ${CONAN_LIBS}) + endif() + # Workaround for system installed VTK (tested on arch) + if(NOT OGS_USE_CONAN) + target_include_directories(VtkVis SYSTEM + PUBLIC ${NETCDF_INCLUDES_C} + PUBLIC ${NETCDF_INCLUDES_CXX}) + endif() endif() set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/NetCdfDialog/NetCdfConfigure.ui b/Applications/DataExplorer/VtkVis/NetCdfConfigure.ui similarity index 100% rename from Applications/DataExplorer/NetCdfDialog/NetCdfConfigure.ui rename to Applications/DataExplorer/VtkVis/NetCdfConfigure.ui diff --git a/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp b/Applications/DataExplorer/VtkVis/NetCdfConfigureDialog.cpp similarity index 100% rename from Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp rename to Applications/DataExplorer/VtkVis/NetCdfConfigureDialog.cpp diff --git a/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.h b/Applications/DataExplorer/VtkVis/NetCdfConfigureDialog.h similarity index 100% rename from Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.h rename to Applications/DataExplorer/VtkVis/NetCdfConfigureDialog.h diff --git a/Applications/DataExplorer/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp b/Applications/DataExplorer/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp index 506ad3f1097e3d098df95088818ef50c303c543f..5076fc6b71dba9f2465a1cbc6bd1ca33fd1ded63 100644 --- a/Applications/DataExplorer/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp +++ b/Applications/DataExplorer/VtkVis/VtkCompositeTextureOnSurfaceFilter.cpp @@ -24,7 +24,7 @@ #include "VtkGeoImageSource.h" #include "VtkRaster.h" #ifdef OGS_USE_NETCDF -#include "NetCdfDialog/NetCdfConfigureDialog.h" +#include "NetCdfConfigureDialog.h" #endif // OGS_USE_NETCDF #include <QFileDialog> diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp index ece68b07f8d1d1f91c322629dbe404b67c15db69..73b630a784b49e4e16de63ed46cd166e37d16be6 100644 --- a/Applications/DataExplorer/mainwindow.cpp +++ b/Applications/DataExplorer/mainwindow.cpp @@ -77,7 +77,7 @@ #include "MeshElementRemovalDialog.h" #include "MeshQualitySelectionDialog.h" #ifdef OGS_USE_NETCDF -#include "NetCdfDialog/NetCdfConfigureDialog.h" +#include "NetCdfConfigureDialog.h" #endif // OGS_USE_NETCDF #include "SHPImportDialog.h" #include "SetNameDialog.h" diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index e20207a689756babee3646ea69b3207bf89c051f..995e3fa864fadf73ae16e8dd475a77e5e1ef4be2 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -30,7 +30,7 @@ target_link_libraries(ApplicationsFileIO GeoLib MathLib logog - PRIVATE MeshLib GitInfoLib) + PRIVATE MeshLib GitInfoLib std::filesystem) if(OGS_BUILD_GUI) # Needed for the XmlPrjInterface, which links the DE/Base/OGSError.h. diff --git a/Applications/FileIO/Legacy/createSurface.cpp b/Applications/FileIO/Legacy/createSurface.cpp index 8b4453ad7c114960de7029bc000af0af72bfb5a4..69698a3cc65347632082a5220b1f3220f88c292a 100644 --- a/Applications/FileIO/Legacy/createSurface.cpp +++ b/Applications/FileIO/Legacy/createSurface.cpp @@ -15,10 +15,13 @@ #include <logog/include/logog.hpp> #include "createSurface.h" +#include "filesystem.h" #include "Applications/FileIO/Gmsh/GMSHInterface.h" #include "Applications/FileIO/Gmsh/GmshReader.h" +#include "BaseLib/StringTools.h" + #include "GeoLib/GEOObjects.h" #include "GeoLib/Point.h" #include "GeoLib/Polygon.h" @@ -77,20 +80,18 @@ bool createSurface(GeoLib::Polyline const& ply, 0.0, 0, geo_names, false, false); gmsh_io.setPrecision(std::numeric_limits<double>::digits10); - char file_base_name_c[L_tmpnam]; - if (! std::tmpnam(file_base_name_c)) - { - OGS_FATAL("Could not create unique file name."); - } - std::string const file_base_name(file_base_name_c); - gmsh_io.writeToFile(file_base_name + ".geo"); - std::string gmsh_command = - gmsh_binary + " -2 -algo meshadapt \"" + file_base_name + ".geo\""; - gmsh_command += " -o \"" + file_base_name + ".msh\""; + // write to random file in temp directory + auto geo_file = fs::temp_directory_path() /= BaseLib::randomString(32); + auto msh_file = fs::temp_directory_path() /= BaseLib::randomString(32); + + gmsh_io.writeToFile(geo_file.string()); // Newer gmsh versions write a newer file format for meshes per default. At // the moment we can't read this new format. This is a switch for gmsh to // write the 'old' file format. - gmsh_command += " -format msh22"; + std::string gmsh_command = + gmsh_binary + " -2 -algo meshadapt -format msh22 -o " + + msh_file.string() + " " + geo_file.string(); + int const gmsh_return_value = std::system(gmsh_command.c_str()); if (gmsh_return_value != 0) { @@ -98,18 +99,14 @@ bool createSurface(GeoLib::Polyline const& ply, gmsh_return_value); } auto surface_mesh = - FileIO::GMSH::readGMSHMesh("\"" + file_base_name + ".msh\""); + FileIO::GMSH::readGMSHMesh(msh_file.string()); if (!surface_mesh) { WARN("The surface mesh could not be created."); return false; } - if (std::remove((file_base_name + ".geo").c_str()) !=0) - WARN("Could not remove temporary file '%s'.", - (file_base_name + ".geo").c_str()); - if (std::remove((file_base_name + ".msh").c_str()) !=0) - WARN("Could not remove temporary file '%s'.", - (file_base_name + ".msh").c_str()); + if (!(fs::remove(geo_file) && fs::remove(msh_file))) + WARN("Could not remove temporary files in createSurface."); // convert the surface mesh into a geometric surface if (!MeshLib::convertMeshToGeo(*surface_mesh, geometries, diff --git a/BaseLib/StringTools.cpp b/BaseLib/StringTools.cpp index a5ee69ff12ff310233ecd44907232509681d7fcf..4faa7ee99099187b88bf4a2c7f7d1c624073c021 100644 --- a/BaseLib/StringTools.cpp +++ b/BaseLib/StringTools.cpp @@ -15,13 +15,14 @@ #include "StringTools.h" #include <algorithm> +#include <boost/algorithm/string/replace.hpp> #include <cctype> +#include <chrono> #include <cstdarg> #include <cstdio> #include <iomanip> - #include <logog/include/logog.hpp> -#include <boost/algorithm/string/replace.hpp> +#include <random> namespace BaseLib { @@ -104,4 +105,24 @@ std::string format(const char* format_str, ... ) return std::string(buffer.data()); } +std::string randomString(std::size_t const length) +{ + static constexpr char charset[] = + "0123456789" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz"; + + static const auto seed = static_cast<std::mt19937::result_type>( + std::chrono::system_clock::now().time_since_epoch().count()); + static std::mt19937 generator{seed}; + static std::uniform_int_distribution<unsigned short> distribution( + 0, sizeof(charset) - 2); + + std::string s(length, 0); + std::generate_n( + begin(s), length, [&]() { return charset[distribution(generator)]; }); + + return s; +} + } // end namespace BaseLib diff --git a/BaseLib/StringTools.h b/BaseLib/StringTools.h index 382a65cc3d82ac1ec6d2dffc276a46ab36e3caa6..ebaa82e523b920d6b4b67db9ccff7407bf834d2d 100644 --- a/BaseLib/StringTools.h +++ b/BaseLib/StringTools.h @@ -83,4 +83,7 @@ std::string const& tostring(std::string const& value); //! returns printf-like formatted string std::string format(const char* format_string, ... ); +//! Returns a random string of the given length containing just a-z,A-Z,0-9 +std::string randomString(std::size_t length); + } // end namespace BaseLib diff --git a/BaseLib/filesystem.h.in b/BaseLib/filesystem.h.in new file mode 100644 index 0000000000000000000000000000000000000000..1e3279a281e1e466e75b70cd566425d2bd3542c5 --- /dev/null +++ b/BaseLib/filesystem.h.in @@ -0,0 +1,3 @@ +// Provides namespace fs for std::filesystem +#include <@CXX_FILESYSTEM_HEADER@> +namespace fs = @CXX_FILESYSTEM_NAMESPACE@; diff --git a/CMakeLists.txt b/CMakeLists.txt index 82703f5e515799bdd40a69dcaf4660e90a1b9091..3356098886cbcbaee6bb967182d5c8bb2c43f1f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,11 @@ # ---- OGS-6 Project ---- -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.14) # Set CMake policies -cmake_policy(SET CMP0054 NEW) -cmake_policy(SET CMP0071 NEW) -cmake_policy(SET CMP0074 NEW) -if(${CMAKE_VERSION} VERSION_GREATER 3.14) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.15) cmake_policy(SET CMP0092 NEW) endif() -if(MSVC AND NOT ${CMAKE_GENERATOR} STREQUAL Ninja) - # Force 64-bit VS compiler - set(CMAKE_GENERATOR_TOOLSET host=x64) -endif() - project(OGS-6) include(scripts/cmake/CMakeSetup.cmake) diff --git a/InfoLib/TestInfo.cpp.in b/InfoLib/TestInfo.cpp.in index c94857c6d3c74a7762064b2d0b5166e7d26fc6c5..133ba5a2c9243d2d8cf5cedef162d1e8b9441522 100644 --- a/InfoLib/TestInfo.cpp.in +++ b/InfoLib/TestInfo.cpp.in @@ -18,6 +18,5 @@ namespace TestInfoLib namespace TestInfo { const std::string data_path("@Data_SOURCE_DIR@"); - const std::string tests_tmp_path("@PROJECT_BINARY_DIR@/Tests/"); } } diff --git a/InfoLib/TestInfo.h b/InfoLib/TestInfo.h index f094ef045848423eda8749ac3c74a71b276f7493..633c86ff7ff3345a40ac6355755864e50b00a3c5 100644 --- a/InfoLib/TestInfo.h +++ b/InfoLib/TestInfo.h @@ -22,6 +22,5 @@ namespace TestInfoLib namespace TestInfo { extern TESTINFOLIB_EXPORT const std::string data_path; - extern TESTINFOLIB_EXPORT const std::string tests_tmp_path; } // namespace } // namespace diff --git a/Jenkinsfile b/Jenkinsfile index 02345cf8eaaf8d4cdd30e3896a3520d4697f5ced..14d3a838e7065be092f728d20d43cbf5c0da730d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,6 +20,7 @@ pipeline { booleanParam(name: 'eve_parallel', defaultValue: true) booleanParam(name: 'win', defaultValue: true) booleanParam(name: 'mac', defaultValue: true) + booleanParam(name: 'mac_gui', defaultValue: true) booleanParam(name: 'clang_analyzer', defaultValue: true) booleanParam(name: 'master_jobs', defaultValue: true) } @@ -287,6 +288,7 @@ pipeline { '-DOGS_USE_CONAN=OFF ' + '-DOGS_BUILD_UTILS=ON ' + '-DBUILD_SHARED_LIBS=ON ' + + '-DOGS_CPU_ARCHITECTURE=sandybridge ' + '-DCMAKE_INSTALL_PREFIX=/global/apps/ogs/head/standard ' + '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/standard ' env = 'eve/cli.sh' @@ -342,6 +344,7 @@ pipeline { '-DOGS_USE_CONAN=OFF ' + '-DOGS_USE_PETSC=ON ' + '-DBUILD_SHARED_LIBS=ON ' + + '-DOGS_CPU_ARCHITECTURE=sandybridge ' + '-DCMAKE_INSTALL_PREFIX=/global/apps/ogs/head/petsc ' + '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/petsc ' env = 'eve/petsc.sh' @@ -388,8 +391,8 @@ pipeline { } agent {label 'win && conan' } environment { - MSVC_NUMBER = '15' - MSVC_VERSION = '2017' + MSVC_NUMBER = '16' + MSVC_VERSION = '2019' OMP_NUM_THREADS = '1' CC = 'clcache' CXX = 'clcache' @@ -461,7 +464,7 @@ pipeline { '-DOGS_CPU_ARCHITECTURE=core2 ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_CONAN_BUILD=missing ' + - '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" ' + '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" ' } build { target="package" @@ -492,8 +495,7 @@ pipeline { stage('Mac-Gui') { when { beforeAgent true - // expression { return params.mac && (stage_required.build || stage_required.full) } - expression { return false } + expression { return params.mac_gui && (stage_required.build || stage_required.full) } } agent { label "mac"} environment { @@ -508,8 +510,8 @@ pipeline { '-DOGS_CPU_ARCHITECTURE=core2 ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_BUILD_GUI=ON ' + - '-DOGS_CONAN_BUILD=missing ' + - '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" ' + + '-DOGS_USE_CONAN=OFF ' + + '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" ' + '-DOGS_USE_NETCDF=ON ' } build { @@ -558,7 +560,7 @@ pipeline { cmakeOptions = "-DBUILD_SHARED_LIBS=${build_shared} " + '-DBUILD_TESTING=OFF ' + - '-DCMAKE_CXX_CLANG_TIDY=clang-tidy-8 ' + '-DCMAKE_CXX_CLANG_TIDY=clang-tidy-9 ' } build { log = 'build.log' } } diff --git a/ProcessLib/SmallDeformation/Tests.cmake b/ProcessLib/SmallDeformation/Tests.cmake index a91256176cc9ddeb92f494b6fa8ac26c527eabe5..fbaf77f9c9adad00495a86df9fbf259625fb94c9 100644 --- a/ProcessLib/SmallDeformation/Tests.cmake +++ b/ProcessLib/SmallDeformation/Tests.cmake @@ -112,7 +112,7 @@ AddTest( REQUIREMENTS NOT OGS_USE_MPI DIFF_DATA GLOB slope_pcs_0_ts_*.vtu displacement displacement 1e-14 0.0 - GLOB slope_pcs_0_ts_*.vtu sigma sigma 1e-8 0.0 + GLOB slope_pcs_0_ts_*.vtu sigma sigma 2e-8 0.0 GLOB slope_pcs_0_ts_*.vtu epsilon epsilon 1e-14 0.0 GLOB slope_pcs_0_ts_*.vtu NodalForces NodalForces 1e-8 0.0 GLOB slope_pcs_0_ts_*.vtu EquivalentPlasticStrain EquivalentPlasticStrain 1e-13 0.0 diff --git a/Tests/Data/Mechanics/MohrCoulombAbboSloan/load_test_mc.prj b/Tests/Data/Mechanics/MohrCoulombAbboSloan/load_test_mc.prj index 0e702ebb1e904135b9677fdadce615e58c7c727d..f1b47572aa7ea0c067ff7607bbfd98eb3d82a4bf 100644 --- a/Tests/Data/Mechanics/MohrCoulombAbboSloan/load_test_mc.prj +++ b/Tests/Data/Mechanics/MohrCoulombAbboSloan/load_test_mc.prj @@ -308,7 +308,7 @@ <vtkdiff> <file>load_test_mc_pcs_0_ts_30_t_30.000000.vtu</file> <field>sigma</field> - <absolute_tolerance>1e-12</absolute_tolerance> + <absolute_tolerance>2e-12</absolute_tolerance> <relative_tolerance>1e-12</relative_tolerance> </vtkdiff> <vtkdiff> @@ -333,7 +333,7 @@ <vtkdiff> <file>load_test_mc_pcs_0_ts_40_t_40.000000.vtu</file> <field>displacement</field> - <absolute_tolerance>1e-13</absolute_tolerance> + <absolute_tolerance>2e-13</absolute_tolerance> <relative_tolerance>1e-14</relative_tolerance> </vtkdiff> <vtkdiff> diff --git a/Tests/FileIO/TestBoostGmlInterface.cpp b/Tests/FileIO/TestBoostGmlInterface.cpp index 0ce657390e072f6ea745cf0303681a89b206cec9..acdeca0fd1ef298c32ba3a9d1b62a1d917749279 100644 --- a/Tests/FileIO/TestBoostGmlInterface.cpp +++ b/Tests/FileIO/TestBoostGmlInterface.cpp @@ -18,6 +18,7 @@ #include "Tests/FileIO/TestGmlInterface.h" +#include "filesystem.h" #include "InfoLib/TestInfo.h" #include "GeoLib/IO/XmlIO/Boost/BoostXmlGmlInterface.h" #include "GeoLib/GEOObjects.h" @@ -25,8 +26,8 @@ TEST_F(TestGmlInterface, BoostXmlGmlWriterReaderTest) { // Writer test - std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path - + "TestXmlGmlReader.gml"); + std::string test_data_file = + (fs::temp_directory_path() /= BaseLib::randomString(32) + ".gml").string(); GeoLib::IO::BoostXmlGmlInterface xml(geo_objects); xml.setNameForExport(geo_name); diff --git a/Tests/FileIO/TestCsvReader.cpp b/Tests/FileIO/TestCsvReader.cpp index d0774ae3e4445e575374aaf2561af3434a5fce01..01abc8460dd282e29dc9c3c4a8d097721fc84fde 100644 --- a/Tests/FileIO/TestCsvReader.cpp +++ b/Tests/FileIO/TestCsvReader.cpp @@ -16,6 +16,7 @@ #include "gtest/gtest.h" +#include "filesystem.h" #include "InfoLib/TestInfo.h" #include "Applications/FileIO/CsvInterface.h" #include "GeoLib/Point.h" @@ -24,8 +25,9 @@ class CsvInterfaceTest : public ::testing::Test { public: CsvInterfaceTest() - : _file_name(TestInfoLib::TestInfo::tests_tmp_path+"test.csv") { + _file_name = + (fs::temp_directory_path() /= BaseLib::randomString(32) + ".csv").string(); std::ofstream out(_file_name); out << "id\tx\ty\tz\tname\tvalue1\tvalue_two\n"; out << "0\t642015.538\t5724666.445\t391.759\ttest_a\t11.05303121\t436.913\t133\n"; diff --git a/Tests/FileIO/TestCsvWriter.cpp b/Tests/FileIO/TestCsvWriter.cpp index 1608e796128c14e8529ebb742e054176098fb815..1cac6c014617f3f0842ec0b85ecc31cc071183a6 100644 --- a/Tests/FileIO/TestCsvWriter.cpp +++ b/Tests/FileIO/TestCsvWriter.cpp @@ -15,12 +15,14 @@ #include <string> #include <vector> +#include "filesystem.h" #include "InfoLib/TestInfo.h" #include "Applications/FileIO/CsvInterface.h" TEST(CsvWriter, WriteReadTest) { - std::string test_file(TestInfoLib::TestInfo::tests_tmp_path + "TestData.csv"); + std::string test_file( + (fs::temp_directory_path() /= BaseLib::randomString(32)).string()); std::vector<std::string> str_vec {"Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet" }; std::vector<int> int_vec { 1, 2, 4, 8, 16, 32, 64 }; diff --git a/Tests/FileIO/TestTetGenInterface.cpp b/Tests/FileIO/TestTetGenInterface.cpp index 263fa43943b1f6cea886c456417518bea0bea8e6..57ab6981516147377f389250f9dd2eca64661780 100644 --- a/Tests/FileIO/TestTetGenInterface.cpp +++ b/Tests/FileIO/TestTetGenInterface.cpp @@ -18,6 +18,7 @@ #include "gtest/gtest.h" +#include "filesystem.h" #include "Applications/FileIO/TetGenInterface.h" #include "InfoLib/TestInfo.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -29,7 +30,8 @@ // read TetGen geometry TEST(FileIO, TetGenSmeshReader) { - std::string const file_name (TestInfoLib::TestInfo::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)); @@ -53,8 +55,10 @@ TEST(FileIO, DISABLED_TetGenSmeshInterface) std::string const file_name (TestInfoLib::TestInfo::data_path + "/FileIO/AmmerSubsurfaceCoarse.vtu"); std::unique_ptr<MeshLib::Mesh const> const mesh (MeshLib::IO::readMeshFromFile(file_name)); - std::string const tg_new_name ("TestSmeshWriter"); - std::string const output_name(TestInfoLib::TestInfo::tests_tmp_path + tg_new_name + ".smesh"); + std::string const tg_new_name (BaseLib::randomString(32)); + std::string const output_name = + (fs::temp_directory_path() /= tg_new_name + ".smesh").string(); + std::cout << output_name << std::endl; std::vector<MeshLib::Node> attr_pnts; FileIO::TetGenInterface tgi; bool result (tgi.writeTetGenSmesh(output_name, *mesh, attr_pnts)); diff --git a/Tests/FileIO_Qt/TestQtGmlInterface.cpp b/Tests/FileIO_Qt/TestQtGmlInterface.cpp index b99e408dc7d7d14cdaeb18d16ff8996c6a7f8207..bf361f4e7af36506ba80617219b003bd243ac2cc 100644 --- a/Tests/FileIO_Qt/TestQtGmlInterface.cpp +++ b/Tests/FileIO_Qt/TestQtGmlInterface.cpp @@ -18,6 +18,7 @@ #include "Tests/FileIO/TestGmlInterface.h" +#include "filesystem.h" #include "InfoLib/TestInfo.h" #include "GeoLib/IO/XmlIO/Qt/XmlGmlInterface.h" #include "GeoLib/GEOObjects.h" @@ -25,8 +26,8 @@ TEST_F(TestGmlInterface, QtXmlGmlWriterReaderTest) { // Writer test - std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path - + "TestXmlGmlReader.gml"); + std::string test_data_file = + (fs::temp_directory_path() /= BaseLib::randomString(32)).string(); GeoLib::IO::XmlGmlInterface xml(geo_objects); xml.setNameForExport(geo_name); diff --git a/Tests/GeoLib/IO/TestGLIReader.cpp b/Tests/GeoLib/IO/TestGLIReader.cpp index f4a538222284e902f2834ef0691005f2dcf72429..d71c3f1aa47864065e82de07b3f65cc6dbddc482 100644 --- a/Tests/GeoLib/IO/TestGLIReader.cpp +++ b/Tests/GeoLib/IO/TestGLIReader.cpp @@ -15,6 +15,7 @@ #include "gtest/gtest.h" +#include "filesystem.h" #include "InfoLib/TestInfo.h" #include "Applications/FileIO/Legacy/OGSIOVer4.h" #include "GeoLib/GEOObjects.h" @@ -23,9 +24,11 @@ class OGSIOVer4InterfaceTest : public ::testing::Test { public: OGSIOVer4InterfaceTest() - : _gli_fname(TestInfoLib::TestInfo::tests_tmp_path+"test.gli") + : _test_path(fs::temp_directory_path() /= BaseLib::randomString(32)), + _gli_fname(_test_path), _surface_fname(_test_path) { - std::ofstream gli_out(_gli_fname); + fs::create_directory(_test_path); + std::ofstream gli_out(_gli_fname /= "test.gli"); gli_out << "#POINTS\n"; gli_out << "0 0 0 0\n"; gli_out << "#SURFACE\n"; @@ -35,18 +38,20 @@ public: gli_out << " Surface.tin\n"; gli_out << "#STOP\n"; gli_out.close(); + _surface_fname /= "Surface.tin"; } - ~OGSIOVer4InterfaceTest() override { std::remove(_gli_fname.c_str()); } + ~OGSIOVer4InterfaceTest() override { fs::remove_all(_test_path); } protected: - std::string _gli_fname; + const fs::path _test_path; + fs::path _gli_fname; + fs::path _surface_fname; }; TEST_F(OGSIOVer4InterfaceTest, SimpleTIN) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out.close(); @@ -55,7 +60,7 @@ TEST_F(OGSIOVer4InterfaceTest, SimpleTIN) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* @@ -63,14 +68,11 @@ TEST_F(OGSIOVer4InterfaceTest, SimpleTIN) ASSERT_TRUE(sfcs != nullptr); ASSERT_EQ(1u, geometries.getSurfaceVec(geometry_name)->size()); ASSERT_EQ(2u, (*geometries.getSurfaceVec(geometry_name))[0]->getNumberOfTriangles()); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, StillCorrectTINWihtAdditionalValueAtEndOfLine) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out.close(); @@ -79,7 +81,7 @@ TEST_F(OGSIOVer4InterfaceTest, StillCorrectTINWihtAdditionalValueAtEndOfLine) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* @@ -87,14 +89,11 @@ TEST_F(OGSIOVer4InterfaceTest, StillCorrectTINWihtAdditionalValueAtEndOfLine) ASSERT_TRUE(sfcs != nullptr); ASSERT_EQ(1u, geometries.getSurfaceVec(geometry_name)->size()); ASSERT_EQ(2u, (*geometries.getSurfaceVec(geometry_name))[0]->getNumberOfTriangles()); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_ZeroAreaTri) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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(); @@ -102,21 +101,18 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_ZeroAreaTri) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* sfcs(geometries.getSurfaceVec(geometry_name)); ASSERT_TRUE(sfcs == nullptr); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_LineDoesNotStartWithID) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out << "1 0.0 0.0 0.0 1.0 0.0.0 0.0 0.0 1.0\n"; @@ -126,21 +122,18 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_LineDoesNotStartWithID) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* sfcs(geometries.getSurfaceVec(geometry_name)); ASSERT_TRUE(sfcs == nullptr); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_PointIsMissing) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out.close(); @@ -149,20 +142,17 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_PointIsMissing) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* sfcs(geometries.getSurfaceVec(geometry_name)); ASSERT_TRUE(sfcs == nullptr); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_CoordOfPointIsMissing) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out.close(); @@ -171,20 +161,17 @@ TEST_F(OGSIOVer4InterfaceTest, InvalidTIN_CoordOfPointIsMissing) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* sfcs(geometries.getSurfaceVec(geometry_name)); ASSERT_TRUE(sfcs == nullptr); - - std::remove(tin_fname.c_str()); } TEST_F(OGSIOVer4InterfaceTest, SimpleTIN_AdditionalEmptyLinesAtEnd) { - std::string tin_fname(TestInfoLib::TestInfo::tests_tmp_path+"Surface.tin"); - std::ofstream tin_out (tin_fname); + std::ofstream tin_out (_surface_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"; tin_out.close(); @@ -193,7 +180,7 @@ TEST_F(OGSIOVer4InterfaceTest, SimpleTIN_AdditionalEmptyLinesAtEnd) GeoLib::GEOObjects geometries; std::vector<std::string> errors; std::string geometry_name("TestGeometry"); - FileIO::Legacy::readGLIFileV4(_gli_fname, geometries, geometry_name, + FileIO::Legacy::readGLIFileV4(_gli_fname.string(), geometries, geometry_name, errors, "dummy_for_gmsh_path"); std::vector<GeoLib::Surface*> const* @@ -201,6 +188,4 @@ TEST_F(OGSIOVer4InterfaceTest, SimpleTIN_AdditionalEmptyLinesAtEnd) ASSERT_TRUE(sfcs != nullptr); ASSERT_EQ(1u, geometries.getSurfaceVec(geometry_name)->size()); ASSERT_EQ(2u, (*geometries.getSurfaceVec(geometry_name))[0]->getNumberOfTriangles()); - - std::remove(tin_fname.c_str()); } diff --git a/Tests/MeshLib/TestVtkMappedMeshSource.cpp b/Tests/MeshLib/TestVtkMappedMeshSource.cpp index 4a847c6236495e34f6eccc4fce2cf750a83b700e..1c8d8320a17de39ae8d6209ca74d4b2cc2f4f566 100644 --- a/Tests/MeshLib/TestVtkMappedMeshSource.cpp +++ b/Tests/MeshLib/TestVtkMappedMeshSource.cpp @@ -17,6 +17,7 @@ #include <memory> #include <numeric> +#include "filesystem.h" #include "MeshLib/IO/VtkIO/VtuInterface.h" #include "MeshLib/Elements/Element.h" #include "MeshLib/Mesh.h" @@ -151,7 +152,8 @@ TEST_F(InSituMesh, DISABLED_MappedMeshSourceRoundtrip) // TODO Add more comparison criteria ASSERT_TRUE(mesh != nullptr); - std::string test_data_file(TestInfoLib::TestInfo::tests_tmp_path + "/MappedMeshSourceRoundtrip.vtu"); + std::string test_data_file = + (fs::temp_directory_path() /= BaseLib::randomString(32)).string(); // -- Test VtkMappedMeshSource, i.e. OGS mesh to VTK mesh vtkNew<MeshLib::VtkMappedMeshSource> vtkSource; diff --git a/ThirdParty/container-maker b/ThirdParty/container-maker index a0f52106b7a095bc32fc1bef7d6af6cd1bd4943a..763b2642a5c850a4d5b3cdc910962985c847239c 160000 --- a/ThirdParty/container-maker +++ b/ThirdParty/container-maker @@ -1 +1 @@ -Subproject commit a0f52106b7a095bc32fc1bef7d6af6cd1bd4943a +Subproject commit 763b2642a5c850a4d5b3cdc910962985c847239c diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cc374d08f7b962939c48df06def08bbc96894818..623251b6c8a4567a05891748fbf4e297e46ca705 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,7 @@ jobs: - job: Windows pool: - vmImage: 'vs2017-win2016' + vmImage: 'windows-2019' timeoutInMinutes: 120 variables: NUM_THREADS: 2 @@ -19,7 +19,7 @@ jobs: call activate.bat mkdir build cd build - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 - cmake .. -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON -DOGS_USE_PCH=OFF + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 + cmake .. -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON -DOGS_USE_PCH=OFF ninja -j 2 ninja -j 2 tests diff --git a/scripts/cmake/CMakeSetup.cmake b/scripts/cmake/CMakeSetup.cmake index 2af12df43c8b043ab88628950c317f982ad7855a..76cc8e9d56b813237e96d5f6469da75d55652c91 100644 --- a/scripts/cmake/CMakeSetup.cmake +++ b/scripts/cmake/CMakeSetup.cmake @@ -10,6 +10,7 @@ endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/scripts/cmake" "${PROJECT_SOURCE_DIR}/scripts/cmake/jedbrown" + "${PROJECT_SOURCE_DIR}/scripts/cmake/vector-of-bool" "${PROJECT_SOURCE_DIR}/ThirdParty/cmake-modules") list(APPEND CMAKE_PREFIX_PATH diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 9c5d86de83ded7ac5d1a029e21c60282ed770d5b..cb5970458c4aaf1f35ff742c638031467848893f 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -176,3 +176,7 @@ if(OGS_USE_CVODE) find_package(CVODE REQUIRED) add_definitions(-DCVODE_FOUND) endif() + +find_package(Filesystem REQUIRED COMPONENTS Final Experimental) +configure_file(${PROJECT_SOURCE_DIR}/BaseLib/filesystem.h.in + ${PROJECT_BINARY_DIR}/BaseLib/filesystem.h) diff --git a/scripts/cmake/PreFind.cmake b/scripts/cmake/PreFind.cmake index 281aad29fe42c146e7e1f14b1d8dff7d61e371ce..e0b08c78904ca5c8f4fc9ec97d9139d43abb3a34 100644 --- a/scripts/cmake/PreFind.cmake +++ b/scripts/cmake/PreFind.cmake @@ -23,4 +23,4 @@ if(OGS_USE_PYTHON) find_package(Python3 COMPONENTS Interpreter Development REQUIRED) else() find_package(Python3 COMPONENTS Interpreter) -endif() \ No newline at end of file +endif() diff --git a/scripts/cmake/vector-of-bool/FindFilesystem.cmake b/scripts/cmake/vector-of-bool/FindFilesystem.cmake new file mode 100644 index 0000000000000000000000000000000000000000..08920a8799e8592b9470d899ee1a2ab2e8a76447 --- /dev/null +++ b/scripts/cmake/vector-of-bool/FindFilesystem.cmake @@ -0,0 +1,227 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: + +FindFilesystem +############## + +This module supports the C++17 standard library's filesystem utilities. Use the +:imp-target:`std::filesystem` imported target to + +Options +******* + +The ``COMPONENTS`` argument to this module supports the following values: + +.. find-component:: Experimental + :name: fs.Experimental + + Allows the module to find the "experimental" Filesystem TS version of the + Filesystem library. This is the library that should be used with the + ``std::experimental::filesystem`` namespace. + +.. find-component:: Final + :name: fs.Final + + Finds the final C++17 standard version of the filesystem library. + +If no components are provided, behaves as if the +:find-component:`fs.Final` component was specified. + +If both :find-component:`fs.Experimental` and :find-component:`fs.Final` are +provided, first looks for ``Final``, and falls back to ``Experimental`` in case +of failure. If ``Final`` is found, :imp-target:`std::filesystem` and all +:ref:`variables <fs.variables>` will refer to the ``Final`` version. + + +Imported Targets +**************** + +.. imp-target:: std::filesystem + + The ``std::filesystem`` imported target is defined when any requested + version of the C++ filesystem library has been found, whether it is + *Experimental* or *Final*. + + If no version of the filesystem library is available, this target will not + be defined. + + .. note:: + This target has ``cxx_std_17`` as an ``INTERFACE`` + :ref:`compile language standard feature <req-lang-standards>`. Linking + to this target will automatically enable C++17 if no later standard + version is already required on the linking target. + + +.. _fs.variables: + +Variables +********* + +.. variable:: CXX_FILESYSTEM_IS_EXPERIMENTAL + + Set to ``TRUE`` when the :find-component:`fs.Experimental` version of C++ + filesystem library was found, otherwise ``FALSE``. + +.. variable:: CXX_FILESYSTEM_HAVE_FS + + Set to ``TRUE`` when a filesystem header was found. + +.. variable:: CXX_FILESYSTEM_HEADER + + Set to either ``filesystem`` or ``experimental/filesystem`` depending on + whether :find-component:`fs.Final` or :find-component:`fs.Experimental` was + found. + +.. variable:: CXX_FILESYSTEM_NAMESPACE + + Set to either ``std::filesystem`` or ``std::experimental::filesystem`` + depending on whether :find-component:`fs.Final` or + :find-component:`fs.Experimental` was found. + + +Examples +******** + +Using `find_package(Filesystem)` with no component arguments: + +.. code-block:: cmake + + find_package(Filesystem REQUIRED) + + add_executable(my-program main.cpp) + target_link_libraries(my-program PRIVATE std::filesystem) + + +#]=======================================================================] + + +if(TARGET std::filesystem) + # This module has already been processed. Don't do it again. + return() +endif() + +include(CMakePushCheckState) +include(CheckIncludeFileCXX) +include(CheckCXXSourceCompiles) + +cmake_push_check_state() + +set(CMAKE_REQUIRED_QUIET ${Filesystem_FIND_QUIETLY}) + +# All of our tests required C++17 or later +set(CMAKE_REQUIRED_FLAGS -std=c++17) + +# Normalize and check the component list we were given +set(want_components ${Filesystem_FIND_COMPONENTS}) +if(Filesystem_FIND_COMPONENTS STREQUAL "") + set(want_components Final) +endif() + +# Warn on any unrecognized components +set(extra_components ${want_components}) +list(REMOVE_ITEM extra_components Final Experimental) +foreach(component IN LISTS extra_components) + message(WARNING "Extraneous find_package component for Filesystem: ${component}") +endforeach() + +# Detect which of Experimental and Final we should look for +set(find_experimental TRUE) +set(find_final TRUE) +if(NOT "Final" IN_LIST want_components) + set(find_final FALSE) +endif() +if(NOT "Experimental" IN_LIST want_components) + set(find_experimental FALSE) +endif() + +if(find_final) + check_include_file_cxx("filesystem" _CXX_FILESYSTEM_HAVE_HEADER) + mark_as_advanced(_CXX_FILESYSTEM_HAVE_HEADER) + if(_CXX_FILESYSTEM_HAVE_HEADER) + # We found the non-experimental header. Don't bother looking for the + # experimental one. + set(find_experimental FALSE) + endif() +else() + set(_CXX_FILESYSTEM_HAVE_HEADER FALSE) +endif() + +if(find_experimental) + check_include_file_cxx("experimental/filesystem" _CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) + mark_as_advanced(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) +else() + set(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER FALSE) +endif() + +if(_CXX_FILESYSTEM_HAVE_HEADER) + set(_have_fs TRUE) + set(_fs_header filesystem) + set(_fs_namespace std::filesystem) +elseif(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER) + set(_have_fs TRUE) + set(_fs_header experimental/filesystem) + set(_fs_namespace std::experimental::filesystem) +else() + set(_have_fs FALSE) +endif() + +set(CXX_FILESYSTEM_HAVE_FS ${_have_fs} CACHE BOOL "TRUE if we have the C++ filesystem headers") +set(CXX_FILESYSTEM_HEADER ${_fs_header} CACHE STRING "The header that should be included to obtain the filesystem APIs") +set(CXX_FILESYSTEM_NAMESPACE ${_fs_namespace} CACHE STRING "The C++ namespace that contains the filesystem APIs") + +set(_found FALSE) + +if(CXX_FILESYSTEM_HAVE_FS) + # We have some filesystem library available. Do link checks + string(CONFIGURE [[ + #include <@CXX_FILESYSTEM_HEADER@> + + int main() { + auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path(); + return static_cast<int>(cwd.string().size()); + } + ]] code @ONLY) + + # Try to compile a simple filesystem program without any linker flags + check_cxx_source_compiles("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED) + + set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED}) + + if(NOT CXX_FILESYSTEM_NO_LINK_NEEDED) + set(prev_libraries ${CMAKE_REQUIRED_LIBRARIES}) + # Add the libstdc++ flag + set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs) + check_cxx_source_compiles("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED) + set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED}) + if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED) + # Try the libc++ flag + set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs) + check_cxx_source_compiles("${code}" CXX_FILESYSTEM_CPPFS_NEEDED) + set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED}) + endif() + endif() + + if(can_link) + add_library(std::filesystem INTERFACE IMPORTED) + target_compile_features(std::filesystem INTERFACE cxx_std_17) + set(_found TRUE) + + if(CXX_FILESYSTEM_NO_LINK_NEEDED) + # Nothing to add... + elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED) + target_link_libraries(std::filesystem INTERFACE -lstdc++fs) + elseif(CXX_FILESYSTEM_CPPFS_NEEDED) + target_link_libraries(std::filesystem INTERFACE -lc++fs) + endif() + endif() +endif() + +cmake_pop_check_state() + +set(Filesystem_FOUND ${_found} CACHE BOOL "TRUE if we can compile and link a program using std::filesystem" FORCE) + +if(Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND) + message(FATAL_ERROR "Cannot Compile simple program using std::filesystem") +endif() diff --git a/scripts/cmake/vector-of-bool/README.md b/scripts/cmake/vector-of-bool/README.md new file mode 100644 index 0000000000000000000000000000000000000000..34e4763cd424d0a334a9d39bf8f5594c91a177c9 --- /dev/null +++ b/scripts/cmake/vector-of-bool/README.md @@ -0,0 +1,4 @@ +Copied from https://github.com/vector-of-bool/CMakeCM. +No explicit repository license given. + +Full url: https://github.com/vector-of-bool/CMakeCM/blob/9ce8ea36c76ca52321d40dd267e03c6cd02f1bcd/modules/FindFilesystem.cmake diff --git a/scripts/docker/Dockerfile.clang.full b/scripts/docker/Dockerfile.clang.full index 1cb27dfee65963c1b48129290057392a1d2b517d..1e6251098fce837a7c9549880398f3f9affb445b 100644 --- a/scripts/docker/Dockerfile.clang.full +++ b/scripts/docker/Dockerfile.clang.full @@ -1,6 +1,8 @@ +# syntax=docker/dockerfile:experimental + FROM ubuntu:18.04 AS build -# Generated with ogs-container-maker 1.2.0 +# Generated with ogs-container-maker 1.4.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -13,16 +15,24 @@ RUN apt-get update -y && \ # LLVM compiler RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - clang-8 && \ + clang-9 \ + clang-format-9 \ + clang-tidy-9 \ + libomp-dev && \ rm -rf /var/lib/apt/lists/* -RUN update-alternatives --install /usr/bin/clang clang $(which clang-8) 30 && \ - update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-8) 30 +RUN update-alternatives --install /usr/bin/clang clang $(which clang-9) 30 && \ + update-alternatives --install /usr/bin/clang++ clang++ $(which clang++-9) 30 && \ + update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9) 30 && \ + update-alternatives --install /usr/bin/clang-tidy clang-tidy $(which clang-tidy-9) 30 +# pip RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - clang-format-8 \ - clang-tidy-8 && \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ rm -rf /var/lib/apt/lists/* +RUN pip3 install scif # OGS base building block # Python @@ -55,16 +65,16 @@ RUN apt-get update && \ git lfs install && \ mkdir -p /apps /scratch /lustre /work /projects /data -# CMake version 3.12.4 +# CMake version 3.14.7 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ make \ wget && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh && \ +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \ mkdir -p /usr/local && \ - /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ - rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh + /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ + rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh ENV PATH=/usr/local/bin:$PATH # Package manager Conan building block @@ -84,41 +94,41 @@ RUN apt-get update -y && \ python3-setuptools \ python3-wheel && \ rm -rf /var/lib/apt/lists/* -RUN pip3 install conan==1.21.0 +RUN pip3 install conan==1.22.2 RUN mkdir -p /opt/conan && \ chmod 777 /opt/conan ENV CONAN_USER_HOME=/opt/conan LABEL org.opengeosys.pm=conan \ - org.opengeosys.pm.conan.version=1.21.0 + org.opengeosys.pm.conan.version=1.22.2 LABEL org.opengeosys.pm.conan.user_home=/opt/conan -# Include-what-you-use for clang version 8 +# Include-what-you-use for clang version 9 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - libclang-8-dev \ + libclang-9-dev \ libncurses5-dev \ - llvm-8-dev \ + llvm-9-dev \ zlib1g-dev && \ rm -rf /var/lib/apt/lists/* -# https://github.com/include-what-you-use/include-what-you-use/archive/clang_8.0.tar.gz -RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/include-what-you-use/include-what-you-use/archive/clang_8.0.tar.gz && \ - mkdir -p /var/tmp && tar -x -f /var/tmp/clang_8.0.tar.gz -C /var/tmp -z && \ - mkdir -p /var/tmp/include-what-you-use-clang_8.0/build && cd /var/tmp/include-what-you-use-clang_8.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-8 /var/tmp/include-what-you-use-clang_8.0 && \ - cmake --build /var/tmp/include-what-you-use-clang_8.0/build --target all -- -j$(nproc) && \ - cmake --build /var/tmp/include-what-you-use-clang_8.0/build --target install -- -j$(nproc) && \ - rm -rf /var/tmp/include-what-you-use-clang_8.0 /var/tmp/clang_8.0.tar.gz +# https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/include-what-you-use/include-what-you-use/archive/clang_9.0.tar.gz && \ + mkdir -p /var/tmp && tar -x -f /var/tmp/clang_9.0.tar.gz -C /var/tmp -z && \ + mkdir -p /var/tmp/include-what-you-use-clang_9.0/build && cd /var/tmp/include-what-you-use-clang_9.0/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/iwyy -D IWYU_LLVM_ROOT_PATH=/usr/lib/llvm-9 /var/tmp/include-what-you-use-clang_9.0 && \ + cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target all -- -j$(nproc) && \ + cmake --build /var/tmp/include-what-you-use-clang_9.0/build --target install -- -j$(nproc) && \ + rm -rf /var/tmp/include-what-you-use-clang_9.0 /var/tmp/clang_9.0.tar.gz ENV PATH=/usr/local/iwyy/bin:$PATH -# Package manager Conan building block +# ccache building block RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ccache && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /opt/cache && chmod 777 /opt/cache -ENV CCACHE_DIR=/opt/cache \ +RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache +ENV CCACHE_DIR=/opt/ccache \ CCACHE_MAXSIZE=15G \ CCACHE_SLOPPINESS=pch_defines,time_macros -LABEL ccache.dir=/opt/cache \ +LABEL ccache.dir=/opt/ccache \ ccache.size=15G # Jenkins node diff --git a/scripts/docker/Dockerfile.gcc.full b/scripts/docker/Dockerfile.gcc.full index f2f099e27f53f998eab1a8f0b0e177300d27ac66..3c663b19609122cf012797dfb8f21a12e380fc87 100644 --- a/scripts/docker/Dockerfile.gcc.full +++ b/scripts/docker/Dockerfile.gcc.full @@ -1,6 +1,8 @@ -FROM ubuntu:18.04 AS build +# syntax=docker/dockerfile:experimental -# Generated with ogs-container-maker 1.2.0 +FROM ubuntu:19.10 AS build + +# Generated with ogs-container-maker 1.4.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -17,6 +19,15 @@ RUN apt-get update -y && \ gcc && \ rm -rf /var/lib/apt/lists/* +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install scif + # OGS base building block # Python RUN apt-get update -y && \ @@ -48,16 +59,16 @@ RUN apt-get update && \ git lfs install && \ mkdir -p /apps /scratch /lustre /work /projects /data -# CMake version 3.12.4 +# CMake version 3.14.7 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ make \ wget && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh && \ +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \ mkdir -p /usr/local && \ - /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ - rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh + /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ + rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh ENV PATH=/usr/local/bin:$PATH # Package manager Conan building block @@ -77,12 +88,12 @@ RUN apt-get update -y && \ python3-setuptools \ python3-wheel && \ rm -rf /var/lib/apt/lists/* -RUN pip3 install conan==1.21.0 +RUN pip3 install conan==1.22.2 RUN mkdir -p /opt/conan && \ chmod 777 /opt/conan ENV CONAN_USER_HOME=/opt/conan LABEL org.opengeosys.pm=conan \ - org.opengeosys.pm.conan.version=1.21.0 + org.opengeosys.pm.conan.version=1.22.2 LABEL org.opengeosys.pm.conan.user_home=/opt/conan # cppcheck version 1.87 @@ -111,16 +122,16 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* RUN pip3 install gcovr -# Package manager Conan building block +# ccache building block RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ccache && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /opt/cache && chmod 777 /opt/cache -ENV CCACHE_DIR=/opt/cache \ +RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache +ENV CCACHE_DIR=/opt/ccache \ CCACHE_MAXSIZE=15G \ CCACHE_SLOPPINESS=pch_defines,time_macros -LABEL ccache.dir=/opt/cache \ +LABEL ccache.dir=/opt/ccache \ ccache.size=15G # Jenkins node diff --git a/scripts/docker/Dockerfile.gcc.gui b/scripts/docker/Dockerfile.gcc.gui index 182f040303f96f9ab0e3986ce6783df5ba8057dc..0eeee444a61294f0090e6113b6afb35508b07023 100644 --- a/scripts/docker/Dockerfile.gcc.gui +++ b/scripts/docker/Dockerfile.gcc.gui @@ -1,6 +1,8 @@ -FROM ubuntu:18.04 AS build +# syntax=docker/dockerfile:experimental -# Generated with ogs-container-maker 1.2.0 +FROM ubuntu:19.10 AS build + +# Generated with ogs-container-maker 1.4.3 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -17,6 +19,15 @@ RUN apt-get update -y && \ gcc && \ rm -rf /var/lib/apt/lists/* +# pip +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + python3-pip \ + python3-setuptools \ + python3-wheel && \ + rm -rf /var/lib/apt/lists/* +RUN pip3 install scif + # OGS base building block # Python RUN apt-get update -y && \ @@ -56,16 +67,16 @@ RUN apt-get update -y && \ mesa-common-dev && \ rm -rf /var/lib/apt/lists/* -# CMake version 3.12.4 +# CMake version 3.14.7 RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ make \ wget && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.12/cmake-3.12.4-Linux-x86_64.sh && \ +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://cmake.org/files/v3.14/cmake-3.14.7-Linux-x86_64.sh && \ mkdir -p /usr/local && \ - /bin/sh /var/tmp/cmake-3.12.4-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ - rm -rf /var/tmp/cmake-3.12.4-Linux-x86_64.sh + /bin/sh /var/tmp/cmake-3.14.7-Linux-x86_64.sh --prefix=/usr/local --skip-license && \ + rm -rf /var/tmp/cmake-3.14.7-Linux-x86_64.sh ENV PATH=/usr/local/bin:$PATH # Package manager Conan building block @@ -85,14 +96,24 @@ RUN apt-get update -y && \ python3-setuptools \ python3-wheel && \ rm -rf /var/lib/apt/lists/* -RUN pip3 install conan==1.21.0 +RUN pip3 install conan==1.22.2 RUN mkdir -p /opt/conan && \ chmod 777 /opt/conan ENV CONAN_USER_HOME=/opt/conan LABEL org.opengeosys.pm=conan \ - org.opengeosys.pm.conan.version=1.21.0 + org.opengeosys.pm.conan.version=1.22.2 LABEL org.opengeosys.pm.conan.user_home=/opt/conan +# CVode version 2.8.2 +# https://github.com/ufz/cvode/archive/2.8.2.tar.gz +RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/ufz/cvode/archive/2.8.2.tar.gz && \ + mkdir -p /var/tmp && tar -x -f /var/tmp/2.8.2.tar.gz -C /var/tmp -z && \ + mkdir -p /var/tmp/cvode-2.8.2/build && cd /var/tmp/cvode-2.8.2/build && cmake -DCMAKE_INSTALL_PREFIX=/usr/local/cvode -D CMAKE_INSTALL_PREFIX=/usr/local/cvode -D EXAMPLES_INSTALL=OFF -D BUILD_SHARED_LIBS=OFF -D CMAKE_POSITION_INDEPENDENT_CODE=ON /var/tmp/cvode-2.8.2 && \ + cmake --build /var/tmp/cvode-2.8.2/build --target all -- -j$(nproc) && \ + cmake --build /var/tmp/cvode-2.8.2/build --target install -- -j$(nproc) && \ + rm -rf /var/tmp/cvode-2.8.2 /var/tmp/2.8.2.tar.gz +ENV CVODE_ROOT=/usr/local/cvode + # cppcheck version 1.87 # https://github.com/danmar/cppcheck/archive/1.87.tar.gz RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://github.com/danmar/cppcheck/archive/1.87.tar.gz && \ @@ -103,6 +124,13 @@ RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https:// rm -rf /var/tmp/cppcheck-1.87 /var/tmp/1.87.tar.gz ENV PATH=/usr/local/cppcheck/bin:$PATH +RUN apt-get update -y && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + doxygen \ + graphviz \ + texlive-base && \ + rm -rf /var/lib/apt/lists/* + # pip RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -112,16 +140,16 @@ RUN apt-get update -y && \ rm -rf /var/lib/apt/lists/* RUN pip3 install gcovr -# Package manager Conan building block +# ccache building block RUN apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ ccache && \ rm -rf /var/lib/apt/lists/* -RUN mkdir -p /opt/cache && chmod 777 /opt/cache -ENV CCACHE_DIR=/opt/cache \ +RUN mkdir -p /opt/ccache && chmod 777 /opt/ccache +ENV CCACHE_DIR=/opt/ccache \ CCACHE_MAXSIZE=15G \ CCACHE_SLOPPINESS=pch_defines,time_macros -LABEL ccache.dir=/opt/cache \ +LABEL ccache.dir=/opt/ccache \ ccache.size=15G # Jenkins node diff --git a/scripts/env/eve/cli.sh b/scripts/env/eve/cli.sh index e13824f0d05ae4f1d6ec5989f21592b208f91f12..5e0f230e10cd20047d12e9f8a3a2f0681c6cef0c 100644 --- a/scripts/env/eve/cli.sh +++ b/scripts/env/eve/cli.sh @@ -7,15 +7,15 @@ fi module use /global/apps/modulefiles -module load foss/2018b -module load cmake +module load foss/2019b +module load CMake/3.15.3 module load ninja -module load git-lfs +module load git/2.23.0 # Libraries -module load Boost/1.67.0 +module load boost/1.67.0-1 module load eigen/3.3.4-1-cmake -module load vtk/8.2.0/foss2018b/serial +module load vtk/8.2.0/foss2019b/serial # Tools module load ccache/3.3.3 diff --git a/scripts/env/eve/mpi.sh b/scripts/env/eve/mpi.sh index 50cfa715bfaf5ac6ef2308a3526ccbeacebca69e..898ccf678f105a3bffbca6577708cc45c5c3d5ff 100644 --- a/scripts/env/eve/mpi.sh +++ b/scripts/env/eve/mpi.sh @@ -5,6 +5,6 @@ else fi source $DIR/cli.sh -module load vtk/8.2.0/foss2018b/openmpi +module load vtk/8.2.0/foss2019b/openmpi export CC=mpicc export CXX=mpic++ diff --git a/scripts/env/eve/petsc.sh b/scripts/env/eve/petsc.sh index d610d216a0b4baf338ccf157fbf4016cb34af82e..2c080425253149ce1087459bb0301f11c2a000db 100644 --- a/scripts/env/eve/petsc.sh +++ b/scripts/env/eve/petsc.sh @@ -5,7 +5,7 @@ else fi source $DIR/mpi.sh -module load petsc-bilke/3.11.0-foss2018b +module load petsc-bilke/3.11.0-foss2019b echo -e "Note: If you want to run a simulation on the cluster be aware of the "\ "mixed CPU architecture. There are Sandy-Bridge-based nodes (orte-28, "\ "frontend2) as well as Skylake-based nodes (orte-40, frontend1)"\ diff --git a/web/data/versions.json b/web/data/versions.json index 7f89598362bcc78b2b388238e72d13772471f3e2..79563e9cbe903f83655247d00b07d5e0aeb17607 100644 --- a/web/data/versions.json +++ b/web/data/versions.json @@ -1,15 +1,15 @@ { "minimum_version": { - "gcc": "7.3", - "clang": "3.5", + "gcc": "8.0", + "clang": "9.0", "msvc": { - "year": "2017", - "number": "15", - "toolset": "141" + "year": "2019", + "number": "16", + "toolset": "142" }, "conan": "1.21.0", "git": "2.14", - "cmake": "3.12", + "cmake": "3.14", "hugo": "0.64.1", "boost": "1.66.0", "eigen": "3.3.4",