mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #6023 from OPM/error-as-warnings-flag-6018
Error as warnings flag 6018
This commit is contained in:
@@ -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*";
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user