diff --git a/Modules/Platform/Windows-PellesC-ASM_POASM.cmake b/Modules/Platform/Windows-PellesC-ASM_POASM.cmake index 2cafaef3bd..2bff21f2b7 100644 --- a/Modules/Platform/Windows-PellesC-ASM_POASM.cmake +++ b/Modules/Platform/Windows-PellesC-ASM_POASM.cmake @@ -6,3 +6,8 @@ __windows_compiler_pellesc(ASM_POASM) set(CMAKE_ASM_POASM_COMPILE_OBJECT " -Fo ") + +string(APPEND CMAKE_ASM_POASM_FLAGS_DEBUG_INIT " -Zi") +string(APPEND CMAKE_ASM_POASM_FLAGS_RELEASE_INIT "") +string(APPEND CMAKE_ASM_POASM_FLAGS_RELWITHDEBINFO_INIT " -Zi") +string(APPEND CMAKE_ASM_POASM_FLAGS_MINSIZEREL_INIT "") diff --git a/Modules/Platform/Windows-PellesC-C.cmake b/Modules/Platform/Windows-PellesC-C.cmake index 64fd5f6ecd..a22251c0b8 100644 --- a/Modules/Platform/Windows-PellesC-C.cmake +++ b/Modules/Platform/Windows-PellesC-C.cmake @@ -6,3 +6,8 @@ __windows_compiler_pellesc(C) set(CMAKE_C_COMPILE_OBJECT " -Fo -c ") + +string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " -Zi -Ob0") +string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -Ot -Ob2 -DNDEBUG=1") +string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -Zi -Ot -Ob1 -DNDEBUG=1") +string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -Os -Ob1 -DNDEBUG=1") diff --git a/Modules/Platform/Windows-PellesC.cmake b/Modules/Platform/Windows-PellesC.cmake index eb165766ac..d29cc4a4d9 100644 --- a/Modules/Platform/Windows-PellesC.cmake +++ b/Modules/Platform/Windows-PellesC.cmake @@ -6,6 +6,8 @@ set(CMAKE_LIBRARY_PATH_FLAG "-libpath:") set(CMAKE_LINK_DEF_FILE_FLAG "-def:") set(CMAKE_LINK_LIBRARY_FLAG "") +set(CMAKE_BUILD_TYPE_INIT Debug) + macro(__windows_compiler_pellesc lang) set(CMAKE_${lang}_CREATE_STATIC_LIBRARY " -out: ") @@ -27,3 +29,8 @@ macro(__windows_compiler_pellesc lang) endif() enable_language(RC) endmacro() + +foreach (t IN ITEMS EXE SHARED MODULE) + string(APPEND CMAKE_${t}_LINKER_FLAGS_DEBUG_INIT " -debug -debugtype:both -dbg") + string(APPEND CMAKE_${t}_LINKER_FLAGS_RELWITHDEBINFO_INIT " -debug -debugtype:both -dbg") +endforeach ()