From e0b7dd76fd31a180ea2d9e783d9e9c8448076df1 Mon Sep 17 00:00:00 2001 From: Anonymous275 Date: Thu, 7 Jan 2021 23:45:17 +0200 Subject: [PATCH] Static server build --- CMakeLists.txt | 8 ++++---- src/Init/Heartbeat.cpp | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e353205..3452086 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,15 +8,15 @@ if (UNIX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -static-libstdc++") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -g") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -s -fno-builtin") -#elseif (WIN32) +elseif (WIN32) # This might cause issues with old windows headers, but it's worth the trouble to keep the code # completely cross platform. For fixes to common issues arising from /permissive- visit: # https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /permissive-") - #message(STATUS "MSVC -> forcing use of statically-linked runtime.") - #STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) - #STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) + message(STATUS "MSVC -> forcing use of statically-linked runtime.") + STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) + STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) #-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static endif () diff --git a/src/Init/Heartbeat.cpp b/src/Init/Heartbeat.cpp index 7fba6d8..99cd88c 100644 --- a/src/Init/Heartbeat.cpp +++ b/src/Init/Heartbeat.cpp @@ -69,7 +69,6 @@ std::string RunPromise(const std::string& IP, const std::string& R) { } } //Server Authenticated - info(T); if (!isAuth) { WebsocketInit(); if (T.length() == 4)info(("Authenticated!"));