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:
commit
e9e32bfc3a
9
.github/workflows/ResInsightWithCache.yml
vendored
9
.github/workflows/ResInsightWithCache.yml
vendored
@ -32,6 +32,14 @@ jobs:
|
||||
vcpkg-triplet: x64-linux,
|
||||
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
|
||||
}
|
||||
- {
|
||||
name: "Ubuntu 20.04",
|
||||
os: ubuntu-20.04,
|
||||
cc: "gcc", cxx: "g++",
|
||||
vcpkg-response-file: vcpkg_x64-linux.txt,
|
||||
vcpkg-triplet: x64-linux,
|
||||
cmake-toolchain: 'vcpkg/scripts/buildsystems/vcpkg.cmake'
|
||||
}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
@ -141,6 +149,7 @@ jobs:
|
||||
-D CMAKE_BUILD_TYPE=$ENV{BUILD_TYPE}
|
||||
-D GSL_ENABLE=true
|
||||
-D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true
|
||||
-D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true
|
||||
-D RESINSIGHT_ENABLE_GRPC=true
|
||||
-D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=python
|
||||
-D VCPKG_TARGET_TRIPLET=${{ matrix.config.vcpkg-triplet }}
|
||||
|
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -59,7 +59,7 @@ jobs:
|
||||
uses: lukka/run-cmake@v1
|
||||
with:
|
||||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
||||
cmakeAppendedArgs: '-DGSL_ENABLE=true -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true'
|
||||
cmakeAppendedArgs: '-DGSL_ENABLE=true -DRESINSIGHT_ENABLE_GRPC=true -DRESINSIGHT_GRPC_PYTHON_EXECUTABLE=python -DRESINSIGHT_ENABLE_PRECOMPILED_HEADERS=true -DRESINSIGHT_ENABLE_UNITY_BUILD=true -DRESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true -DRESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true'
|
||||
buildDirectory: ${{ github.workspace }}/cmakebuild
|
||||
buildWithCMakeArgs: '--config Release --target package'
|
||||
useVcpkgToolchainFile: true
|
||||
@ -92,4 +92,4 @@ jobs:
|
||||
path: ${{ runner.workspace }}/ResInsight/cmakebuild/packages
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,14 +28,6 @@ void caf::FilePath::setPath(const QString& filePath)
|
||||
m_filePath = filePath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void caf::FilePath::operator=(const FilePath& other)
|
||||
{
|
||||
m_filePath = other.m_filePath;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -19,7 +19,6 @@ public:
|
||||
QString path() const;
|
||||
void setPath(const QString& valueText);
|
||||
|
||||
void operator=(const FilePath& other);
|
||||
bool operator==(const FilePath& other) const;
|
||||
|
||||
private:
|
||||
|
@ -414,12 +414,12 @@ TEST(BaseTest, PdmChildArrayFieldHandle)
|
||||
InheritedDemoObj* ihd1 = new InheritedDemoObj;
|
||||
caf::PdmChildArrayFieldHandle* listField = &(ihd1->m_childArrayField);
|
||||
|
||||
EXPECT_EQ(0, listField->size());
|
||||
EXPECT_EQ(0u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_TRUE(listField->empty());
|
||||
|
||||
listField->insertAt(0, s0);
|
||||
EXPECT_EQ(1, listField->size());
|
||||
EXPECT_EQ(1u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
@ -427,17 +427,17 @@ TEST(BaseTest, PdmChildArrayFieldHandle)
|
||||
ihd1->m_childArrayField.push_back(s2);
|
||||
ihd1->m_childArrayField.push_back(s3);
|
||||
|
||||
EXPECT_EQ(4, listField->size());
|
||||
EXPECT_EQ(4u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
listField->erase(0);
|
||||
EXPECT_EQ(3, listField->size());
|
||||
EXPECT_EQ(3u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
listField->deleteAllChildObjects();
|
||||
EXPECT_EQ(0, listField->size());
|
||||
EXPECT_EQ(0u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_TRUE(listField->empty());
|
||||
}
|
||||
@ -535,7 +535,7 @@ TEST(BaseTest, PdmPtrField)
|
||||
{
|
||||
std::vector<caf::PdmObjectHandle*> objects;
|
||||
ihd1->m_ptrField.ptrReferencedObjects(&objects);
|
||||
EXPECT_EQ(1, objects.size());
|
||||
EXPECT_EQ(1u, objects.size());
|
||||
EXPECT_EQ(ihd2, objects[0]);
|
||||
}
|
||||
|
||||
@ -547,21 +547,21 @@ TEST(BaseTest, PdmPtrField)
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> ptrFields;
|
||||
ihd2->referringPtrFields(ptrFields);
|
||||
EXPECT_EQ(1, ptrFields.size());
|
||||
EXPECT_EQ(1u, ptrFields.size());
|
||||
EXPECT_EQ(&(ihd1->m_ptrField), ptrFields[0]);
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<caf::PdmObjectHandle*> objects;
|
||||
ihd2->objectsWithReferringPtrFields(objects);
|
||||
EXPECT_EQ(1, objects.size());
|
||||
EXPECT_EQ(1u, objects.size());
|
||||
EXPECT_EQ(ihd1, objects[0]);
|
||||
}
|
||||
|
||||
{
|
||||
std::vector<InheritedDemoObj*> reffingDemoObjects;
|
||||
ihd2->objectsWithReferringPtrFieldsOfType(reffingDemoObjects);
|
||||
EXPECT_EQ(1, reffingDemoObjects.size());
|
||||
EXPECT_EQ(1u, reffingDemoObjects.size());
|
||||
}
|
||||
|
||||
delete ihd1;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -327,7 +327,7 @@ TEST(BaseTest, ChildArrayFieldSerializing)
|
||||
|
||||
{
|
||||
InheritedDemoObj* ihd1 = new InheritedDemoObj;
|
||||
ASSERT_EQ(0, ihd1->m_childArrayField.size());
|
||||
ASSERT_EQ(0u, ihd1->m_childArrayField.size());
|
||||
|
||||
QXmlStreamReader xmlStream(serializedString);
|
||||
|
||||
@ -385,7 +385,7 @@ TEST(BaseTest, FilePathSerializing)
|
||||
|
||||
ihd1->readObjectFromXmlString(serializedString, caf::PdmDefaultObjectFactory::instance());
|
||||
|
||||
EXPECT_EQ(2, ihd1->m_multipleFilePath.v().size());
|
||||
EXPECT_EQ(2u, ihd1->m_multipleFilePath.v().size());
|
||||
EXPECT_EQ(newVal.toStdString(), ihd1->m_singleFilePath().path().toStdString());
|
||||
|
||||
delete ihd1;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -463,9 +463,8 @@ TEST(BaseTest, PdmChildArrayField)
|
||||
}
|
||||
#endif
|
||||
|
||||
template <>
|
||||
inline void GTestStreamToHelper<QString>(std::ostream* os, const QString& val) {
|
||||
*os << val.toLatin1().data();
|
||||
void PrintTo(const QString& val, std::ostream* os) {
|
||||
*os << val.toLatin1().data();
|
||||
}
|
||||
|
||||
|
||||
@ -889,12 +888,12 @@ TEST(BaseTest, PdmChildArrayFieldHandle)
|
||||
InheritedDemoObj* ihd1 = new InheritedDemoObj;
|
||||
caf::PdmChildArrayFieldHandle* listField = &(ihd1->m_simpleObjectsField);
|
||||
|
||||
EXPECT_EQ(0, listField->size());
|
||||
EXPECT_EQ(0u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_TRUE(listField->empty());
|
||||
|
||||
ihd1->m_simpleObjectsField.push_back(new SimpleObj);
|
||||
EXPECT_EQ(1, listField->size());
|
||||
EXPECT_EQ(1u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
@ -902,17 +901,17 @@ TEST(BaseTest, PdmChildArrayFieldHandle)
|
||||
ihd1->m_simpleObjectsField.push_back(s2);
|
||||
ihd1->m_simpleObjectsField.push_back(s3);
|
||||
|
||||
EXPECT_EQ(4, listField->size());
|
||||
EXPECT_EQ(4u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
listField->erase(0);
|
||||
EXPECT_EQ(3, listField->size());
|
||||
EXPECT_EQ(3u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_FALSE(listField->empty());
|
||||
|
||||
listField->deleteAllChildObjects();
|
||||
EXPECT_EQ(0, listField->size());
|
||||
EXPECT_EQ(0u, listField->size());
|
||||
EXPECT_TRUE(listField->hasSameFieldCountForAllObjects());
|
||||
EXPECT_TRUE(listField->empty());
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6782
Fwk/VizFwk/ThirdParty/gtest/gtest-all.cpp
vendored
6782
Fwk/VizFwk/ThirdParty/gtest/gtest-all.cpp
vendored
File diff suppressed because it is too large
Load Diff
16396
Fwk/VizFwk/ThirdParty/gtest/gtest.h
vendored
16396
Fwk/VizFwk/ThirdParty/gtest/gtest.h
vendored
File diff suppressed because it is too large
Load Diff
8136
ThirdParty/gtest/gtest-all.cc
vendored
8136
ThirdParty/gtest/gtest-all.cc
vendored
File diff suppressed because it is too large
Load Diff
16284
ThirdParty/gtest/gtest.h
vendored
16284
ThirdParty/gtest/gtest.h
vendored
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user