diff options
author | Chris Robinson <[email protected]> | 2021-08-23 11:08:58 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-08-23 11:08:58 -0700 |
commit | 602b33fede0ce7d158ca96cda6db45742b2b2fce (patch) | |
tree | 8cf1a633b3f0cc6ab0e3741fa93c79437edb737b /CMakeLists.txt | |
parent | b841ce5e17cfafa168ea8de709803b5308f8d4c6 (diff) |
Always define NOMINMAX on Windows
Clang needs it too, not just MSVC, and it doesn't seem to hurt MinGW.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d56a729..9ed212db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,7 @@ set(LINKER_FLAGS ) set(EXTRA_LIBS ) if(WIN32) - set(CPP_DEFS ${CPP_DEFS} _WIN32) + set(CPP_DEFS ${CPP_DEFS} _WIN32 NOMINMAX) if(MINGW) set(CPP_DEFS ${CPP_DEFS} __USE_MINGW_ANSI_STDIO) endif() @@ -210,7 +210,7 @@ if(HAVE_LIBLOG) endif() if(MSVC) - set(CPP_DEFS ${CPP_DEFS} _CRT_SECURE_NO_WARNINGS NOMINMAX) + set(CPP_DEFS ${CPP_DEFS} _CRT_SECURE_NO_WARNINGS) check_cxx_compiler_flag(/permissive- HAVE_PERMISSIVE_SWITCH) if(HAVE_PERMISSIVE_SWITCH) set(C_FLAGS ${C_FLAGS} $<$<COMPILE_LANGUAGE:CXX>:/permissive->) |