mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[cmake,c++] define NOMINMAX
Windows header define min and max posing issues with c++ standard library https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c
This commit is contained in:
@@ -62,5 +62,10 @@ if (ENABLE_WARNING_ERROR)
|
||||
CheckCXXFlag(-Werror)
|
||||
endif()
|
||||
|
||||
# https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c
|
||||
if (WIN32)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-DNOMINMAX>)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "default CXXFLAGS")
|
||||
message("Using CXXFLAGS ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user