Patch #1024 2006-05-01 10:53
typz
Microsoft VC++ 2005 compiler support- Download
- 1024-Microsoft_VC_2.patch (15.8 KB)
Index: src/CodeBlocks.cbp
===================================================================
--- src/CodeBlocks.cbp (revision 2397)
+++ src/CodeBlocks.cbp (working copy)
@@ -889,6 +889,16 @@
<Option link="0" />
<Option target="Compiler" />
</Unit>
+ <Unit filename="plugins\compilergcc\compilerMSVC8.cpp">
+ <Option compilerVar="CPP" />
+ <Option target="Compiler" />
+ </Unit>
+ <Unit filename="plugins\compilergcc\compilerMSVC8.h">
+ <Option compilerVar="CPP" />
+ <Option compile="0" />
+ <Option link="0" />
+ <Option target="Compiler" />
+ </Unit>
<Unit filename="plugins\compilergcc\compilerOW.cpp">
<Option compilerVar="CPP" />
<Option target="Compiler" />
Index: src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- src/plugins/compilergcc/compilergcc.cpp (revision 2397)
+++ src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -54,6 +54,7 @@
// TODO (mandrav#1#): Find out which compilers exist for linux and adapt this
#ifdef __WXMSW__
#include "compilerMSVC.h"
+ #include "compilerMSVC8.h"
#include "compilerBCC.h"
#include "compilerDMC.h"
#include "compilerOW.h"
@@ -233,6 +234,7 @@
CompilerFactory::RegisterCompiler(new CompilerMINGW);
#ifdef __WXMSW__
CompilerFactory::RegisterCompiler(new CompilerMSVC);
+ CompilerFactory::RegisterCompiler(new CompilerMSVC8);
CompilerFactory::RegisterCompiler(new CompilerBCC);
CompilerFactory::RegisterCompiler(new CompilerDMC);
CompilerFactory::RegisterCompiler(new CompilerOW);
Index: src/plugins/compilergcc/compilerMSVC8.cpp
===================================================================
--- src/plugins/compilergcc/compilerMSVC8.cpp (revision 0)
+++ src/plugins/compilergcc/compilerMSVC8.cpp (revision 0)
@@ -0,0 +1,290 @@
+#ifdef __WXMSW__
+// this compiler is valid only in windows
+
+#include <sdk.h>
+#include "compilerMSVC8.h"
+#include <wx/wx.h>
+#include <wx/log.h>
+#include <wx/intl.h>
+#include <wx/regex.h>
+#include <wx/config.h>
+
+#ifdef __WXMSW__
+ #include <wx/msw/registry.h>
+#endif
+
+CompilerMSVC8::CompilerMSVC8()
+ : Compiler(_("Microsoft Visual C++ 2005"), _T("msvc8"))
+{
+ Reset();
+}
+
+CompilerMSVC8::~CompilerMSVC8()
+{
+ //dtor
+}
+
+Compiler * CompilerMSVC8::CreateCopy()
+{
+ return new CompilerMSVC8(*this);
+}
+
+void CompilerMSVC8::Reset()
+{
+ m_Programs.C = _T("cl.exe");
+ m_Programs.CPP = _T("cl.exe");
+ m_Programs.LD = _T("link.exe");
+ m_Programs.LIB = _T("link.exe");
+ m_Programs.WINDRES = _T("rc.exe");
+ m_Programs.MAKE = _T("nmake.exe");
+ m_Programs.DBG = _T("cdb.exe");
+
+ m_Switches.includeDirs = _T("/I");
+ m_Switches.libDirs = _T("/LIBPATH:");
+ m_Switches.linkLibs = _T("");
+ m_Switches.defines = _T("/D");
+ m_Switches.genericSwitch = _T("/");
+ m_Switches.objectExtension = _T("obj");
+ m_Switches.needDependencies = false;
+ m_Switches.forceCompilerUseQuotes = false;
+ m_Switches.forceLinkerUseQuotes = false;
+ m_Switches.logging = clogNone;
+ m_Switches.buildMethod = cbmDirect;
+ m_Switches.libPrefix = _T("");
+ m_Switches.libExtension = _T("lib");
+ m_Switches.linkerNeedsLibPrefix = false;
+ m_Switches.linkerNeedsLibExtension = true;
+
+ m_Options.ClearOptions();
+
+ //Language
+ m_Options.AddOption(_("Produce debugging symbols"),
+ _T("/Zi /D_DEBUG"),
+ _("Language"),
+ _T("/DEBUG"),
+ true,
+ _T("/Og /O1 /O2 /Os /Ot /Ox /NDEBUG"),
+ _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+ m_Options.AddOption(_("Disable extensions"), _T("/Za"), _("Language"));
+ // /vd{0|1|2} disable/enable vtordisp
+ // /vm<x> type of pointers to members
+ m_Options.AddOption(_("Enforce Standard C++ for scoping rules"), _T("/Zc:forScope"), _("Language"));
+ m_Options.AddOption(_("wchar_t is the native type, not a typedef"), _T("/Zc:wchar_t"), _("Language"));
+ m_Options.AddOption(_("Enable Edit and Continue debug info"), _T("/ZI"), _("Language"));
+ m_Options.AddOption(_("Enable OpenMP 2.0 language extensions"), _T("/openmp"), _("Language"));
+
+ //Warnings
+ m_Options.AddOption(_("Disable all warnings"), _T("/w"), _("Warnings"));
+ m_Options.AddOption(_("Enable all compiler warnings"), _T("/Wall"), _("Warnings"));
+ m_Options.AddOption(_("Enable warnings level 1"), _T("/W1"), _("Warnings"));
+ m_Options.AddOption(_("Enable warnings level 2"), _T("/W2"), _("Warnings"));
+ m_Options.AddOption(_("Enable warnings level 3"), _T("/W3"), _("Warnings"));
+ m_Options.AddOption(_("Enable warnings level 4"), _T("/W4"), _("Warnings"));
+ m_Options.Ad
download for full patch...
History
mandrav 2006-05-09 08:50
Patch applied, thanks.