8f6256c0bf84c4d0a36dfee7957da0026a1ce01d
[WebKit-https.git] / Source / cmake / OptionsWindows.cmake
1 ADD_DEFINITIONS(-DWTF_PLATFORM_WIN=1)
2 SET(WTF_PLATFORM_WIN 1)
3
4 ADD_DEFINITIONS(-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DUNICODE)
5
6 INCLUDE_DIRECTORIES(${JAVASCRIPTCORE_DIR}/os-win32)
7
8 IF (MSVC)
9     ADD_DEFINITIONS(/WX
10         /wd4018 /wd4065 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4180 /wd4189 /wd4201 /wd4244 /wd4251 /wd4275 /wd4288 /wd4291
11         /wd4305 /wd4344 /wd4355 /wd4389 /wd4396 /wd4503 /wd4505 /wd4510 /wd4512 /wd4610 /wd4706 /wd4800 /wd4951 /wd4952 /wd4996)
12
13     STRING(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
14     STRING(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
15
16     IF (NOT MSVC_VERSION LESS 1500)
17         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
18         SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
19     ENDIF ()
20 ENDIF ()
21
22 STRING(REPLACE "/ENTRY:mainACRTStartup" "/ENTRY:WinMainCRTStartup" CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})