Skip to content
Snippets Groups Projects
Commit a922bb15 authored by Tobias Leibner's avatar Tobias Leibner
Browse files

Fix warnings and enable -Werror on CI

parent db8d694b
No related branches found
No related tags found
1 merge request!92Apply clang tidy, use -Werror on CI
Pipeline #108290 passed
......@@ -17,6 +17,10 @@ cmake_minimum_required(VERSION 3.13)
project("dune-xt" CXX)
if("${TRAVIS}" EQUAL "1")
add_compile_options(-Werror -Wno-error=unknown-pragmas -Wno-error=pedantic)
endif()
# local environment
set(ENV{PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../local/bin:$ENV{PATH}")
set(ENV{LD_LIBRARY_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../local/lib:$ENV{LD_LIBRARY_PATH}")
......
......@@ -184,11 +184,11 @@ macro(ADD_SUBDIR_TESTS subdir)
add_custom_target(${subdir}_test_templates SOURCES ${test_templates})
# this excludes meta-ini variation test cases because there binary name != test name
foreach(test ${${subdir}_xt_test_binaries})
if(TARGET test)
foreach(test ${${subdir}_dxt_test_binaries})
if(TEST test)
set_tests_properties(${test} PROPERTIES TIMEOUT ${DXT_TEST_TIMEOUT})
set_tests_properties(${test} PROPERTIES LABELS ${subdir})
endif(TARGET test)
endif(TEST test)
endforeach()
add_custom_target(${subdir}_test_binaries DEPENDS ${${subdir}_dxt_test_binaries})
......
......@@ -260,7 +260,7 @@ public:
{
// initialize variables
inside_elements_ = std::make_shared<std::vector<LocalElementType>>();
inside_elements_ids_ = std::make_shared<std::vector<int>>();
inside_elements_ids_ = std::make_shared<std::vector<unsigned int>>();
coupling_intersections_ = std::make_shared<
std::vector<std::set<CorrectedCouplingIntersectionType, CompareType<CorrectedCouplingIntersectionType>>>>();
local_to_inside_indices_ = std::make_shared<std::vector<std::pair<size_t, size_t>>>();
......@@ -386,7 +386,7 @@ private:
const LocalGridProviderType& local_inside_grid_;
size_t coupling_size_;
std::shared_ptr<std::vector<LocalElementType>> inside_elements_;
std::shared_ptr<std::vector<int>> inside_elements_ids_;
std::shared_ptr<std::vector<unsigned int>> inside_elements_ids_;
std::shared_ptr<
std::vector<std::set<CorrectedCouplingIntersectionType, CompareType<CorrectedCouplingIntersectionType>>>>
coupling_intersections_;
......
......@@ -183,7 +183,7 @@ struct GluedDdGridTest : public ::testing::Test
ASSERT_NE(macro_grid_, nullptr) << "This should not happen!";
ASSERT_NE(dd_grid_, nullptr) << "This should not happen!";
for (int ss = 0; ss < dd_grid_->num_subdomains(); ss++) {
for (size_t ss = 0; ss < dd_grid_->num_subdomains(); ss++) {
auto local_grid = dd_grid_->local_grid(ss);
EXPECT_EQ(macro_grid_->dimDomain, local_grid.dimDomain);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment