7 Commits

3 changed files with 23 additions and 3 deletions

View File

@@ -10,6 +10,8 @@ project(ColumnLynx
LANGUAGES CXX
)
include(GNUInstallDirs)
# ---------------------------------------------------------
# General C++ setup
# ---------------------------------------------------------
@@ -40,7 +42,7 @@ endif()
if(WIN32)
add_compile_definitions(_WIN32_WINNT=0x0A00 NOMINMAX WIN32_LEAN_AND_MEAN)
elseif(UNIX)
add_compile_options(-Wall -Wextra -Wpedantic -O3)
add_compile_options(-Wall -Wextra -Wpedantic -O1)
add_link_options(-pthread)
endif()
@@ -157,3 +159,17 @@ target_include_directories(server PRIVATE
)
target_compile_definitions(server PRIVATE ASIO_STANDALONE)
set_target_properties(server PROPERTIES OUTPUT_NAME "columnlynx_server")
# ---------------------------------------------------------
# Install rules
# ---------------------------------------------------------
install(TARGETS
client
server
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(FILES
LICENSES/GPL-2.0-only.txt
LICENSES/GPL-3.0.txt
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/licenses/${PROJECT_NAME})

View File

@@ -15,6 +15,7 @@
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <bits/stdc++.h>
#ifdef _WIN32
#include <winsock2.h>

View File

@@ -151,8 +151,11 @@ namespace ColumnLynx::Utils {
}
std::string line;
while (std::getline(file, line)) {
// Convert to upper case to align with the bytesToHexString() output
for (int i = 0; i < line.length(); i++) {
line[i] = toupper(line[i]);
}
out.push_back(line);
}