Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ target_compile_definitions(OpenTS PRIVATE
WIN32
_WINDOWS
_MBCS
NOMINMAX

# Compiles Blowfish into the binary instead of reaching it through the COM object in
# blowfish.dll. It decides the layout of BlowfishEngine, so every translation unit has
Expand Down
12 changes: 0 additions & 12 deletions code/always.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ void __cdecl operator delete(void * ptr);
#define WWINLINE inline
#endif

// Windows headers define 'min' and 'max' as macros, which would break every
// std::min and std::max call in the tree.
#define NOMINMAX

#ifdef min
#undef min
#endif

#ifdef max
#undef max
#endif


/*
** This includes the minimum set of compiler defines and pragmas in order to bring the
Expand Down
1 change: 1 addition & 0 deletions code/language/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ file(GLOB_RECURSE LANG_SRC CONFIGURE_DEPENDS

add_library(Language SHARED ${LANG_SRC})
target_compile_features(Language PRIVATE cxx_std_20)
target_compile_definitions(Language PRIVATE NOMINMAX)

# The version resource is stamped from the generated headers, which the resource compiler
# reaches through the target's include paths.
Expand Down
1 change: 1 addition & 0 deletions code/vqalib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ target_compile_definitions(VQALib PRIVATE
WIN32
_WINDOWS
_MBCS
NOMINMAX
)

# Callers reach the vqaplay.h family through the library, while the player itself reaches
Expand Down
2 changes: 1 addition & 1 deletion tests/cpudetect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ target_include_directories(CpuDetect PRIVATE
"${CMAKE_SOURCE_DIR}/code"
)

target_compile_definitions(CpuDetect PRIVATE WIN32 _WINDOWS _MBCS)
target_compile_definitions(CpuDetect PRIVATE WIN32 _WINDOWS _MBCS NOMINMAX)

# The engine builds these sources with SSE2 and precise floating point. The harness matches
# that so a result here carries over to the engine.
Expand Down
2 changes: 1 addition & 1 deletion tests/gamedirs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ target_include_directories(GameDirs PRIVATE

add_dependencies(GameDirs OpenTSBuildStamp)

target_compile_definitions(GameDirs PRIVATE WIN32 _WINDOWS _MBCS)
target_compile_definitions(GameDirs PRIVATE WIN32 _WINDOWS _MBCS NOMINMAX)

target_compile_options(GameDirs PRIVATE
$<$<CONFIG:Debug>:/MTd /EHsc /Zc:__cplusplus>
Expand Down
2 changes: 1 addition & 1 deletion tests/logstress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target_include_directories(LogStress PRIVATE

add_dependencies(LogStress OpenTSBuildStamp)

target_compile_definitions(LogStress PRIVATE WIN32 _WINDOWS _MBCS)
target_compile_definitions(LogStress PRIVATE WIN32 _WINDOWS _MBCS NOMINMAX)

target_compile_options(LogStress PRIVATE
$<$<CONFIG:Debug>:/MTd /EHsc /Zc:__cplusplus>
Expand Down
Loading