Skip to content

Commit

Permalink
- Variable Init was wrong for Windows compiler
Browse files Browse the repository at this point in the history
- Improved CMakeLists.txt
- Update submodule (CMakeLists.txt of submodules)
- Added missing library to vcproj
  • Loading branch information
Tomenz committed Nov 13, 2024
1 parent cae0709 commit d3274be
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ enable_language(CXX)

ADD_DEFINITIONS(-DUNICODE)
ADD_DEFINITIONS(-D_UNICODE)
if (MSVC)
if (WIN32)
# Turn off Microsofts "security" warnings.
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CONSOLE _SCL_SECURE_NO_WARNINGS NOGDICAPMASKS NOVIRTUALKEYCODES NOWINMESSAGES NOWINSTYLES NOSYSMETRICS NOMENUS NOICONS NOKEYSTATES NOSYSCOMMANDS NORASTEROPS NOSHOWWINDOW OEMRESOURCE NOATOM NOCLIPBOARD NOCOLOR NOCTLMGR NODRAWTEXT NOGDI NOKERNEL NOUSER NONLS NOMB NOMEMMGR NOMETAFILE NOMINMAX NOMSG NOOPENFILE NOSCROLL NOSOUND NOTEXTMETRIC NOWH NOWINOFFSETS NOCOMM NOKANJI NOHELP NOPROFILER NODEFERWINDOWPOS NOMCX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
#set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
add_compile_options("/EHa")
else()
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb -D_DEBUG -DDEBUG")
Expand Down
2 changes: 1 addition & 1 deletion FastCgi
Submodule FastCgi updated 2 files
+13 −7 CMakeLists.txt
+2 −0 FastCgi.cpp
3 changes: 2 additions & 1 deletion Http2Serv.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,15 @@
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>$(SolutionDir);brotli\c\include</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>x64\Release;$(OpenSSL_Home)</AdditionalLibraryDirectories>
<AdditionalDependencies>CommonLib.lib;socketlib64.lib;brotli.lib;zlib.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>CommonLib.lib;socketlib64.lib;brotli.lib;zlib.lib;libcrypto.lib;libssl.lib;SrvLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>copy "$(SolutionDir)$(PlatForm)\$(Configuration)\$(ProjectName)\$(TargetFileName)" "$(SolutionDir)$(TargetFileName)"</Command>
Expand Down
2 changes: 1 addition & 1 deletion SocketLib
Submodule SocketLib updated 2 files
+0 −9 .travis.yml
+13 −7 CMakeLists.txt
2 changes: 1 addition & 1 deletion SpawnProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mutex SpawnProcess::s_mtxIOstreams;
SpawnProcess::SpawnProcess() : m_fdStdOutPipe{-1,-1}, m_fdStdInPipe{-1,-1}, m_fdStdErrPipe{-1,-1}
{
#if defined(_WIN32) || defined(_WIN64)
m_hProcess{INVALID_HANDLE_VALUE};
m_hProcess = INVALID_HANDLE_VALUE;
#endif

char** aszEnv {_environ};
Expand Down
2 changes: 1 addition & 1 deletion SrvLib
Submodule SrvLib updated 4 files
+0 −9 .travis.yml
+11 −12 CMakeLists.txt
+0 −1 README.md
+3 −0 ServMain.cpp

0 comments on commit d3274be

Please sign in to comment.