BUG: /DWIN32 and /D_WINDOWS should be defined for all configurations or if no configuration is set.

This commit is contained in:
Brad King 2006-03-16 17:40:48 -05:00
parent 437e28e63a
commit 88f69f0df9
1 changed files with 30 additions and 30 deletions

View File

@ -159,48 +159,48 @@ IF(CMAKE_COMPILER_2005)
SET(CMAKE_C_LINK_EXECUTABLE "${CMAKE_C_LINK_EXECUTABLE}"
"mt /manifest <TARGET>.manifest /outputresource:<TARGET>\;#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)