From 88f69f0df99ab4d49506ee51f72dd9b13048079a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 16 Mar 2006 17:40:48 -0500 Subject: [PATCH] BUG: /DWIN32 and /D_WINDOWS should be defined for all configurations or if no configuration is set. --- Modules/Platform/Windows-cl.cmake | 60 +++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake index cf4333c95..39fea0d14 100644 --- a/Modules/Platform/Windows-cl.cmake +++ b/Modules/Platform/Windows-cl.cmake @@ -159,48 +159,48 @@ IF(CMAKE_COMPILER_2005) SET(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}" "mt /manifest .manifest /outputresource:\;#2") SET(CMAKE_BUILD_TYPE_INIT Debug) - SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /EHsc /GR") - SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MDd /Zi /Ob0 /Od /RTC1") - SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MD /O1 /Ob1 /D NDEBUG") - SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MD /O2 /Ob2 /D NDEBUG") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MD /Zi /O2 /Ob1 /D NDEBUG") - SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000") - SET (CMAKE_C_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MDd /Zi /Ob0 /Od /RTC1") - SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MD /O1 /Ob1 /D NDEBUG") - SET (CMAKE_C_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MD /O2 /Ob2 /D NDEBUG") - SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib " CACHE STRING "Libraries linked by defalut with all applications.") ELSE(CMAKE_COMPILER_2005) IF(CMAKE_USING_VC_FREE_TOOLS) MESSAGE(STATUS "Using FREE VC TOOLS, NO DEBUG available") SET(CMAKE_BUILD_TYPE_INIT Release) - SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR") - SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MTd /Zi /Ob0 /Od /GZ") - SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MT /O1 /Ob1") - SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MT /O2 /Ob2") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MT /Zi /O2 /Ob1") - SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000 /GX /GR") - SET (CMAKE_C_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MTd /Zi /Ob0 /Od /GZ") - SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MT /O1 /Ob1") - SET (CMAKE_C_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MT /O2 /Ob2") - SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MT /Zi /O2 /Ob1") + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib advapi32.lib rpcrt4.lib" CACHE STRING "Libraries linked by defalut with all applications.") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib advapi32.lib rpcrt4.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib" CACHE STRING "Libraries linked by defalut with all applications.") ELSE(CMAKE_USING_VC_FREE_TOOLS) SET(CMAKE_BUILD_TYPE_INIT Debug) - SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR") - SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MDd /Zi /Ob0 /Od /GZ") - SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MD /O1 /Ob1 /D NDEBUG") - SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MD /O2 /Ob2 /D NDEBUG") - SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MD /Zi /O2 /Ob1 /D NDEBUG") - SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000") - SET (CMAKE_C_FLAGS_DEBUG_INIT "/DWIN32 /D_DEBUG /D_WINDOWS /MDd /Zi /Ob0 /Od /GZ") - SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/DWIN32 /D_WINDOWS /MD /O1 /Ob1 /D NDEBUG") - SET (CMAKE_C_FLAGS_RELEASE_INIT "/DWIN32 /D_WINDOWS /MD /O2 /Ob2 /D NDEBUG") - SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/DWIN32 /D_WINDOWS /MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") SET (CMAKE_STANDARD_LIBRARIES "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" CACHE STRING "Libraries linked by defalut with all applications.") ENDIF(CMAKE_USING_VC_FREE_TOOLS)