diff --git a/CMakeLists.txt b/CMakeLists.txt index a09f431..67e45e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,8 @@ else() set(OUTPUT_NAME "stocksim") endif() +add_compile_options("$<$:-utf-8>") + add_executable(${OUTPUT_NAME} src/main.cpp src/random_price.cpp diff --git a/Makefile b/Makefile index 2a4c7aa..928a4c4 100644 --- a/Makefile +++ b/Makefile @@ -137,6 +137,7 @@ OUTPUT = stocksim-msvc.exe endif endif +# -GL can further reduce size, but more likely to flag as malicious msvc: src/*.cpp include/*.h clean cl -std:c++17 -EHsc -utf-8 -Iinclude -W1 -WX -O1 -guard:cf -MP \ src/*.cpp -Fe:$(OUTPUT) diff --git a/src/main.cpp b/src/main.cpp index dbc77cf..cf05fcc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -52,9 +52,7 @@ void enableWindowsVTProcessing(void) { // Enable virtual terminal processing consoleMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING; SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), consoleMode); - std::cout << "Experimental Windows VT processing enabled." << std::endl; - // Enable Data Execution Prevention (DEP) for the process - SetProcessDEPPolicy(PROCESS_DEP_ENABLE); + std::cout << "Experimental Windows VT processing enabled.\n"; } #else #define enableWindowsVTProcessing() // Do nothing