Merge pull request #6023 from OPM/error-as-warnings-flag-6018

Error as warnings flag 6018
This commit is contained in:
Kristian Bendiksen
2020-06-04 13:40:52 +02:00
committed by GitHub
30 changed files with 121015 additions and 121953 deletions

View File

@@ -1376,7 +1376,7 @@ int RiaApplication::launchUnitTests()
QString filterText = RiaPreferences::current()->gtestFilter();
if ( !filterText.isEmpty() )
{
::testing::GTEST_FLAG( filter ) = filterText.toLatin1();
::testing::GTEST_FLAG( filter ) = filterText.toStdString();
// Example on filter syntax
//::testing::GTEST_FLAG( filter ) = "*RifCaseRealizationParametersReaderTest*";

View File

@@ -22,6 +22,7 @@ find_package( OpenGL )
option(RESINSIGHT_ENABLE_GRPC "Enable the gRPC scripting framework" OFF)
option(RESINSIGHT_GRPC_BUNDLE_PYTHON_MODULE "Bundle the gRPC python modules into the install folder" OFF)
option(RESINSIGHT_TREAT_WARNINGS_AS_ERRORS "Treat warnings as errors (stops build)" OFF)
find_package(Qt5 COMPONENTS Core QUIET)
@@ -393,7 +394,7 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch")
# Treat warnings as errors on new gcc versions
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.2)
if (RESINSIGHT_TREAT_WARNINGS_AS_ERRORS)
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch -Werror")
endif()
endif()

View File

@@ -106,25 +106,25 @@ TEST( DISABLED_HDFTests, BasicFileRead )
} // end of try block
catch ( H5::FileIException error ) // catch failure caused by the H5File operations
catch ( H5::FileIException& error ) // catch failure caused by the H5File operations
{
std::cout << error.getCDetailMsg();
}
catch ( H5::DataSetIException error ) // catch failure caused by the DataSet operations
catch ( H5::DataSetIException& error ) // catch failure caused by the DataSet operations
{
std::cout << error.getCDetailMsg();
}
catch ( H5::DataSpaceIException error ) // catch failure caused by the DataSpace operations
catch ( H5::DataSpaceIException& error ) // catch failure caused by the DataSpace operations
{
std::cout << error.getCDetailMsg();
}
catch ( H5::DataTypeIException error ) // catch failure caused by the DataSpace operations
catch ( H5::DataTypeIException& error ) // catch failure caused by the DataSpace operations
{
std::cout << error.getCDetailMsg();
}
}
#endif // USE_HDF5
#endif // USE_HDF5