Skip to content

Commit

Permalink
Fixed a couple more Windows issues
Browse files Browse the repository at this point in the history
  • Loading branch information
noodlecollie committed Apr 20, 2023
1 parent 41f6f8a commit e15c8ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 0 additions & 2 deletions xash3d_engine/filesystem/VFileSystem009.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ GNU General Public License for more details.
#include "VFileSystem009.h"
#include "common/com_strings.h"

#include "alloca.h"

#if __cplusplus < 201103L
#define override
#define nullptr NULL
Expand Down
12 changes: 11 additions & 1 deletion xash3d_engine/thirdparty/opus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF CACHE BOOL "" FORCE)
# A slow speed warning message is printed if Opus is compiled without optimisations.
# We never want this, so just force -O3 here for GCC.
if(NOT MSVC)
add_compile_options("-O3")
add_compile_options("-O3")
endif()

# On MSVC there is some warning spam about "macro expansion producing 'defined' has undefined behavior".
# I'm not sure where this comes from and haven't been able to work it out.
# It seems to be produced by the use of the _CRT_INTERNAL_NONSTDC_NAMES macro.
# The closest issue I've been able to find in the wild is https://stackoverflow.com/q/65402366
# which seems to imply that CMake may be at fault, but I don't know how or why.
# For now, we just disable this warning for Opus.
if(MSVC)
add_compile_options("/wd5105")
endif()

set(OLD_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
Expand Down

0 comments on commit e15c8ea

Please sign in to comment.