Skip to content

Commit

Permalink
- Fixed: wrong compilation line was used in some rare cases
Browse files Browse the repository at this point in the history
- added PCH project to codelite, this project now contains the main pre-compiled header of codelite. You should build this project before building any other project

git-svn-id: https://codelite.svn.sourceforge.net/svnroot/codelite/trunk@5002 9da81c78-c036-0410-9e1f-a2b0375e4b5a
  • Loading branch information
eranif committed Jul 24, 2011
1 parent a5b60af commit 1d4cc91
Show file tree
Hide file tree
Showing 45 changed files with 934 additions and 492 deletions.
29 changes: 18 additions & 11 deletions CodeFormatter/CodeFormatter.project
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,29 @@
<Dependencies Name="WinDebug_29"/>
<Dependencies Name="WinRelease_29"/>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="WinDebugUnicode"/>
<Dependencies Name="WinReleaseUnicode"/>
<VirtualDirectory Name="CodeFormatter">
<File Name="ASLocalizer.cpp"/>
<File Name="ASLocalizer.h"/>
</VirtualDirectory>
<Dependencies Name="WinReleaseUnicode"/>
<Dependencies Name="WinDebugUnicode"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="">
<IncludePath Value="."/>
<Preprocessor Value="__WX__"/>
<Preprocessor Value="WXUSINGDLL"/>
<Preprocessor Value="_WIN32_WINNT=0x501"/>
<Preprocessor Value="ASTYLE_LIB"/>
<Preprocessor Value="WXUSINGDLL_SDK"/>
<Preprocessor Value="WXUSINGDLL_CL"/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="WinDebugUnicode" CompilerType="gnu g++" DebuggerType="" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no">
<IncludePath Value="."/>
<IncludePath Value="../Interfaces"/>
<IncludePath Value="../CodeLite"/>
Expand All @@ -72,7 +72,9 @@
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).dll" IntermediateDirectory="./WinDebugUnicode" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand All @@ -96,14 +98,15 @@
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<Configuration Name="WinReleaseUnicode" CompilerType="gnu g++" DebuggerType="" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="$(shell wx-config --cxxflags --unicode=yes --debug=no);-O2" C_Options="$(shell wx-config --cxxflags --unicode=yes --debug=no);-O2" Required="yes" PreCompiledHeader="">
<Configuration Name="WinReleaseUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="$(shell wx-config --cxxflags --unicode=yes --debug=no);-O2;-Winvalid-pch" C_Options="$(shell wx-config --cxxflags --unicode=yes --debug=no);-O2" Required="yes" PreCompiledHeader="../PCH/precompiled_header_release.h" PCHInCommandLine="yes">
<IncludePath Value="."/>
<IncludePath Value="../Interfaces"/>
<IncludePath Value="../CodeLite"/>
<IncludePath Value="../Plugin"/>
<IncludePath Value="../sdk/wxscintilla/include"/>
<IncludePath Value="../sdk/wxsqlite3/include"/>
<IncludePath Value="../PCH"/>
</Compiler>
<Linker Options="-O2;$(shell wx-config --debug=no --libs --unicode=yes);-s" Required="yes">
<LibraryPath Value="../lib/gcc_lib"/>
Expand All @@ -112,8 +115,10 @@
<Library Value="libwxscintillau.dll"/>
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="$(IntermediateDirectory)\$(ProjectName).dll" IntermediateDirectory="./WinReleaseUnicode" Command="../Runtime/CodeLite.exe" CommandArguments="-b ../Runtime" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<General OutputFile="$(IntermediateDirectory)/$(ProjectName).dll" IntermediateDirectory="./WinReleaseUnicode" Command="../Runtime/CodeLite.exe" CommandArguments="-b ../Runtime" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand All @@ -138,7 +143,7 @@
</AdditionalRules>
</Configuration>
<Configuration Name="Win_wxWidgets_29" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="">
<Compiler Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" C_Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)" Required="yes" PreCompiledHeader="" PCHInCommandLine="no">
<IncludePath Value="."/>
<IncludePath Value="../Interfaces"/>
<IncludePath Value="../CodeLite"/>
Expand All @@ -153,7 +158,9 @@
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="../Runtime/plugins/CodeFormatter.dll" IntermediateDirectory="./WinDbg_29" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/codeformatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#include "precompiled_header.h"
#include "globals.h"
#include "editor_config.h"
#include "codeformatter.h"
Expand All @@ -32,7 +33,6 @@
#include "wx/log.h"
#include "codeformatterdlg.h"
#include "wx/menu.h"
#include "precompiled_header.h"
#include "file_logger.h"


Expand Down
58 changes: 32 additions & 26 deletions CodeLite/CodeLite.project
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,25 @@
<File Name="stringaccessor.cpp"/>
</VirtualDirectory>
<Dependencies Name="WinRelease_29"/>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="WinReleaseUnicode"/>
<Dependencies Name="WinDebugUnicode"/>
<Settings Type="Dynamic Library">
<GlobalSettings>
<Compiler Options="" C_Options="">
<IncludePath Value="."/>
<Preprocessor Value="__WX__"/>
<Preprocessor Value="WXUSINGDLL"/>
<Preprocessor Value="WXMAKINGDLL_CL"/>
<Preprocessor Value="WXUSINGDLL_WXSQLITE3"/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
<Configuration Name="WinDebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" Required="yes" PreCompiledHeader="">
<Compiler Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" C_Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" Required="yes" PreCompiledHeader="" PCHInCommandLine="no">
<IncludePath Value="."/>
<IncludePath Value="./include"/>
<IncludePath Value="../sdk/wxsqlite3/include"/>
Expand All @@ -180,8 +196,10 @@
<Library Value="libwxsqlite3ud.dll"/>
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="../lib/gcc_lib/libcodeliteud.dll" IntermediateDirectory="./WinDebugUnicode" Command="" CommandArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<General OutputFile="../lib/gcc_lib/libcodeliteud.dll" IntermediateDirectory="./WinDebugUnicode" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand All @@ -206,19 +224,22 @@
</AdditionalRules>
</Configuration>
<Configuration Name="WinReleaseUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="$(shell wx-config --cxxflags --debug=no --unicode=yes);-Wall;-O2" Required="yes" PreCompiledHeader="">
<Compiler Options="$(shell wx-config --cxxflags --debug=no --unicode=yes);-Wall;-O2;-Winvalid-pch" C_Options="$(shell wx-config --cxxflags --debug=no --unicode=yes);-Wall;-O2" Required="yes" PreCompiledHeader="../PCH/precompiled_header_release.h" PCHInCommandLine="yes">
<IncludePath Value="."/>
<IncludePath Value="./include"/>
<IncludePath Value="../sdk/wxsqlite3/include"/>
<IncludePath Value="../sdk/codelite_indexer/network"/>
<IncludePath Value="../PCH"/>
</Compiler>
<Linker Options="$(shell wx-config --libs --debug=no --unicode=yes);-s" Required="yes">
<LibraryPath Value="../lib/gcc_lib"/>
<Library Value="libwxsqlite3u.dll"/>
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="../lib/gcc_lib/libcodeliteu.dll" IntermediateDirectory="./WinReleaseUnicode" Command="" CommandArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<General OutputFile="../lib/gcc_lib/libcodeliteu.dll" IntermediateDirectory="./WinReleaseUnicode" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand All @@ -243,7 +264,7 @@
</AdditionalRules>
</Configuration>
<Configuration Name="Win_wxWidgets_29" CompilerType="gnu g++" DebuggerType="GNU gdb debugger" Type="Dynamic Library" BuildCmpWithGlobalSettings="append" BuildLnkWithGlobalSettings="append" BuildResWithGlobalSettings="append">
<Compiler Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" Required="yes" PreCompiledHeader="">
<Compiler Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" C_Options="$(shell wx-config --cxxflags --debug=yes --unicode=yes);-g;-Wall" Required="yes" PreCompiledHeader="" PCHInCommandLine="no">
<IncludePath Value="."/>
<IncludePath Value="./include"/>
<IncludePath Value="../sdk/wxsqlite3/include"/>
Expand All @@ -254,8 +275,10 @@
<Library Value="libwxsqlite3ud.dll"/>
</Linker>
<ResourceCompiler Options="" Required="no"/>
<General OutputFile="../lib/gcc_lib/libcodeliteud.dll" IntermediateDirectory="./WinDbg_29" Command="" CommandArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;"/>
<General OutputFile="../lib/gcc_lib/libcodeliteud.dll" IntermediateDirectory="./WinDbg_29" Command="" CommandArguments="" UseSeparateDebugArgs="no" DebugArguments="" WorkingDirectory="" PauseExecWhenProcTerminates="yes"/>
<Environment EnvVarSetName="&lt;Use Defaults&gt;" DbgSetName="&lt;Use Defaults&gt;">
<![CDATA[]]>
</Environment>
<Debugger IsRemote="no" RemoteHostName="" RemoteHostPort="" DebuggerPath="">
<PostConnectCommands/>
<StartupCommands/>
Expand All @@ -279,22 +302,5 @@
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<GlobalSettings>
<Compiler Options="">
<IncludePath Value="."/>
<Preprocessor Value="__WX__"/>
<Preprocessor Value="WXUSINGDLL"/>
<Preprocessor Value="WXMAKINGDLL_CL"/>
<Preprocessor Value="WXUSINGDLL_WXSQLITE3"/>
<Preprocessor Value="_WIN32_WINNT=0x0501"/>
</Compiler>
<Linker Options="">
<LibraryPath Value="."/>
</Linker>
<ResourceCompiler Options=""/>
</GlobalSettings>
</Settings>
<Dependencies Name="Win_wxWidgets_29"/>
<Dependencies Name="WinDebugUnicode"/>
<Dependencies Name="WinReleaseUnicode"/>
</CodeLite_Project>
4 changes: 2 additions & 2 deletions CodeLite/lex.yy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
#endif

#ifdef __cplusplus
#include "precompiled_header.h"
#include <stdlib.h>
#include "unistd.h"
#include <iostream>
#include <iostream>

#include "FlexLexer.h"
#include "precompiled_header.h"
#endif

namespace flex
Expand Down
99 changes: 13 additions & 86 deletions CodeLite/precompiled_header.h
Original file line number Diff line number Diff line change
@@ -1,86 +1,13 @@
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//
// copyright : (C) 2008 by Eran Ifrah
// file name : precompiled_header.h
//
// -------------------------------------------------------------------------
// A
// _____ _ _ _ _
// / __ \ | | | | (_) |
// | / \/ ___ __| | ___| | _| |_ ___
// | | / _ \ / _ |/ _ \ | | | __/ _ )
// | \__/\ (_) | (_| | __/ |___| | || __/
// \____/\___/ \__,_|\___\_____/_|\__\___|
//
// F i l e
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#ifndef CODELITE_PRECOMPILED_HEADER_H
#define CODELITE_PRECOMPILED_HEADER_H

// Only include the headers we need here
#include <wx/app.h>
#include <wx/frame.h>
#include <wx/string.h>
#include <wx/process.h>
#include <wx/filename.h>
#include <wx/treectrl.h>
#include <wx/string.h>
#include <wx/log.h>
#include <wx/settings.h>

#include <iostream>
#include <vector>
#include <map>
#include <stack>
#include "readtags.h"

/////////////////////////////////////////////////////////////////////////////
// Unicode:
// Use the following macros, in the following cases:
//
// 1. If your API requires const char*, wrap wxString with _C() macro
// 2. To convert char* ( not litteral ) use _U()
// 3. To convert literal strings, use _T()
/////////////////////////////////////////////////////////////////////////////

#ifdef __APPLE__
#include <ctype.h>
#undef _C /* _CTYPE_C */
#undef _U /* _CTYPE_U */
#endif

#ifdef wxUSE_UNICODE
#ifndef _U
#define _U(x) wxString((x),wxConvUTF8)
#endif
#ifndef _UU
#define _UU(x,y) wxString((x),y)
#endif
#ifndef _CC
#define _CC(x,y) (x).mb_str((y))
#endif
#else
#ifndef _U
#define _U(x) (x)
#endif
#ifndef _UU
#define _UU(x,y) (x)
#endif
#ifndef _CC
#define _CC(x,y) (x)
#endif
#endif

#ifndef _C
#define _C(x) _CC((x),wxConvUTF8)
#endif

#endif // CODELITE_PRECOMPILED_HEADER_H
#ifndef PRECOMPILED_HEADER_H
#define PRECOMPILED_HEADER_H

// A proxy to the right PCH file
// we need to so we will get a different flags compiled per file
#ifdef NDEBUG
# include "precompiled_header_release.h"
#else
# include "precompiled_header_dbg.h"
#endif

#endif

Loading

0 comments on commit 1d4cc91

Please sign in to comment.