Changeset 14513


Ignore:
Timestamp:
Apr 23, 2015, 9:32:00 PM (6 years ago)
Author:
mikedld
Message:

Define WIN32_LEAN_AND_MEAN and NOMINMAX for our own code only

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r14505 r14513  
    119119        # Use Unicode API (although we always use W or A names explicitly)
    120120        set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DUNICODE -D_UNICODE")
    121         # Filter out needless definitions
    122         set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DWIN32_LEAN_AND_MEAN -DNOMINMAX")
    123121        # Ignore various deprecation and security warnings (at least for now)
    124122        set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS")
     
    317315
    318316include_directories(${CMAKE_BINARY_DIR})
     317
     318if(WIN32)
     319    foreach(L C CXX)
     320        # Filter out needless definitions
     321        set(CMAKE_${L}_FLAGS "${CMAKE_${L}_FLAGS} -DWIN32_LEAN_AND_MEAN -DNOMINMAX")
     322    endforeach()
     323endif()
    319324
    320325if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
Note: See TracChangeset for help on using the changeset viewer.