This commit is contained in:
Robin Dietzel 2023-11-01 10:29:35 +01:00
parent 78562a45ba
commit 304af488ce
3 changed files with 15 additions and 2 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
cmake-build-debug
cmake-build-release
.idea
task1/dataset.dat

View File

@ -7,5 +7,17 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
set(CMAKE_)
add_compile_options(
-Wall
-Wpedantic
-O3
-g3
)
add_compile_definitions(
NDEBUG)
endif ()
add_subdirectory(task1)

View File

@ -36,7 +36,7 @@ auto parse_file(std::ifstream &stream, std::vector<T> &vec) -> void {
}
int main(int argc, char *argv[]) {
auto main(int argc, char *argv[]) -> int {
try {
std::ifstream file("dataset.dat", std::ios_base::in);
if (!file.is_open()) {
@ -65,7 +65,7 @@ int main(int argc, char *argv[]) {
return 0;
} catch (std::exception e) {
fmt::print("Could not open file");
fmt::print("Error occured: {}", e.what());
return -1;
}