Skip to content

Commit e194457

Browse files
committed
fun with (more) flags
1 parent 64e8df5 commit e194457

File tree

4 files changed

+55
-8
lines changed

4 files changed

+55
-8
lines changed

CMakeLists.txt

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,62 @@ add_subdirectory(.githooks)
3131
# --- Compile Options Configuration ---
3232
# Common compile options including strict warnings and error-on-warning
3333
set(COMMON_CXX_WARNING_FLAGS
34-
"-Wall"
35-
"-Wextra"
3634
"-Wfatal-errors"
3735
"-Wconversion"
3836
"-Wsign-conversion"
39-
"-Wunused"
4037
"-Wunreachable-code"
4138
"-Wuninitialized"
42-
"-Wshadow"
43-
"-Wfloat-equal"
44-
"-Wnon-virtual-dtor"
4539
"-pedantic"
4640
"-Wpedantic"
4741
"-Wold-style-cast"
4842
"-Wcast-align"
43+
"-Werror"
44+
"-Wall"
45+
"-Wextra"
46+
"-Wundef"
47+
"-Wunused"
48+
"-Wcast-qual"
49+
"-Wpointer-arith"
50+
"-Wdate-time"
51+
"-Wfloat-equal"
52+
"-Wformat=2"
53+
"-Wshadow"
54+
"-Wsign-compare"
55+
"-Wunused-macros"
56+
"-Wvla"
57+
"-Wdisabled-optimization"
58+
"-Wempty-body"
59+
"-Wignored-qualifiers"
60+
"-Wtype-limits"
61+
"-Wshift-negative-value"
62+
"-Wswitch-default"
63+
"-Woverloaded-virtual"
64+
"-Wnon-virtual-dtor"
65+
"-Wshift-overflow=2"
66+
"-Wshift-count-overflow"
67+
"-Wwrite-strings"
68+
"-Wmissing-format-attribute"
69+
"-Wformat-nonliteral"
4970
"-Wduplicated-cond"
71+
"-Wtrampolines"
72+
"-Wsized-deallocation"
73+
"-Wlogical-op"
74+
"-Wsuggest-attribute=format"
5075
"-Wduplicated-branches"
51-
"-Werror"
76+
"-Wmissing-include-dirs"
77+
"-Wformat-signedness"
78+
"-Wreturn-local-addr"
79+
"-Wredundant-decls"
80+
"-Wfloat-conversion"
81+
"-fno-common"
82+
"-fno-strict-aliasing"
83+
"-Wno-return-type"
84+
"-Wno-array-bounds"
85+
"-Wno-maybe-uninitialized"
86+
"-Wno-unused-but-set-variable"
87+
"-Wno-unused-variable"
88+
"-Wno-unused-parameter"
89+
"-Wno-unused-result"
5290
)
5391

5492
# --- Project-specific Compile Flags ---

include/osp/auxiliary/io/arch_file_reader.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ bool readBspArchitecture(std::ifstream &infile, BspArchitecture<Graph_t> &archit
7373
architecture.setMemoryConstraintType(MEMORY_CONSTRAINT_TYPE::PERSISTENT_AND_TRANSIENT);
7474
architecture.setMemoryBound(static_cast<memw_t>(M));
7575
break;
76+
default:
77+
std::cerr << "Invalid memory type.\n";
78+
return false;
7679
}
7780
} else if (mem_type == -1) {
7881
std::cout << "No memory type specified. Assuming \"NONE\".\n";

include/osp/coarser/Sarkar/Sarkar.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,12 @@ std::vector<std::vector<vertex_idx_t<Graph_t_in>>> Sarkar<Graph_t_in, Graph_t_ou
608608
diff = homogeneous_buffer_merge(params.commCost, dag_in, expansionMap);
609609
}
610610
break;
611+
612+
default: // TODO check if it makes sense
613+
{
614+
diff = singleContraction(params.commCost, dag_in, expansionMap);
615+
}
616+
break;
611617
}
612618

613619
// std::cout << " Diff: " << diff << '\n';

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ macro( _add_test name )
1111
# Create the test
1212
add_executable(test_${name} ${name}.cpp)
1313
target_link_libraries(test_${name} PRIVATE OneStopParallel Boost::unit_test_framework ProjectExecutableFlags)
14-
target_include_directories( test_${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include )
14+
target_include_directories( test_${name} PRIVATE ${PROJECT_SOURCE_DIR}/include )
1515

1616
if(ARG_DATA)
1717
target_compile_definitions(test_${name} PRIVATE OSP_TEST_DATA_DIR="${OSP_DATA_DIR}")

0 commit comments

Comments
 (0)