downloads-by-cmake now configurable, fix wx2.8 compiler errors

This commit is contained in:
Dick Hollenbeck 2013-06-05 09:24:03 -05:00
parent 1ec4986422
commit 0f1f0f92f1
9 changed files with 37 additions and 26 deletions

View File

@ -74,6 +74,13 @@ else()
message("Build testing (unstable) version of KiCad")
endif()
# All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they
# would have to be downloaded over and over again. The default is to choose a directory that is
# hidden on linux (starts with a '.') because there is a way to exclude this directory when grepping
# the source tree.
set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake
CACHE PATH "Location of KiCad downloads, suggested is a dir common to all builds, i.e. global." )
#================================================
# Set flags for GCC.
@ -149,6 +156,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG")
endif()
# quiet GCC 4.8.1 while in boost
if( GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8 )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" )
endif()
endif(CMAKE_COMPILER_IS_GNUCXX)
if(wxUSE_UNICODE)
@ -239,10 +251,6 @@ include(Functions)
include( ExternalProject )
# All CMake downloads go here, up in the source tree, not in the build dir where they
# would have to be downloaded over and over again.
set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads-by-cmake )
#================================================
# Find libraries that are needed to build KiCad.
#================================================

View File

@ -106,16 +106,18 @@
*
*/
#include <worksheet.h> // defaultPageLayout
// height of the band reference grid 2.0 mm
// worksheet frame reference text size 1.3 mm
// default text size 1.5 mm
// default line width 0.15 mm
// frame ref pitch 50 mm
extern const wxString defaultPageLayout;
// Default page layout (sizes are in mm)
const wxString defaultPageLayout( wxT( "( page_layout\n"
const char defaultPageLayout[] = "( page_layout\n"
"(setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) )"
"(rect (comment rect around the title block) (linewidth 0.15) (start 110 34) (end 2 2) )\n"
"(rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) )\n"
@ -146,4 +148,5 @@ const wxString defaultPageLayout( wxT( "( page_layout\n"
"(tbtext \"%C3\" (comment Comment 0) (pos 108 32) )\n"
"(line (start 90 8.5) end 90 5.5) )\n"
"(line (start 26 8.5) end 26 2) )\n"
")\n" ) );
")\n"
;

View File

@ -36,10 +36,6 @@
#include <vector2d.h>
#include <page_layout_reader_lexer.h>
// defaultPageLayout is the default page layout description
// using the S expr.
// see page_layout_default_shape.cpp
extern const wxString defaultPageLayout;
using namespace TB_READER_T;
@ -448,7 +444,7 @@ double PAGE_LAYOUT_READER_PARSER::parseDouble()
void WORKSHEET_LAYOUT::SetDefaultLayout()
{
PAGE_LAYOUT_READER_PARSER lp_parser( defaultPageLayout, "default page" );
PAGE_LAYOUT_READER_PARSER lp_parser( defaultPageLayout, wxT( "default page" ) );
try
{

View File

@ -47,4 +47,9 @@ void DrawPageLayout( wxDC* aDC, EDA_DRAW_PANEL * aCanvas,
int aPenWidth, double aScalar,
EDA_COLOR_T aLineColor, EDA_COLOR_T aTextColor );
// defaultPageLayout is the default page layout description
// using the S expr.
// see page_layout_default_shape.cpp
extern const char defaultPageLayout[];
#endif // WORKSHEET_H_

View File

@ -97,6 +97,7 @@ set(PCBNEW_DIALOGS
dialogs/dialog_mask_clearance_base.cpp
dialogs/dialog_SVG_print.cpp
dialogs/dialog_SVG_print_base.cpp
dialogs/dialog_set_grid.cpp
dialogs/dialog_set_grid_base.cpp
footprint_wizard.cpp
footprint_wizard_frame.cpp
@ -192,7 +193,6 @@ set(PCBNEW_CLASS_SRCS
print_board_functions.cpp
printout_controler.cpp
ratsnest.cpp
set_grid.cpp
specctra.cpp
specctra_export.cpp
specctra_import.cpp

View File

@ -1,5 +1,5 @@
/**
* @file set_grid.cpp
* @file dialog_set_grid.cpp
* @brief Manage user grid.
*/
/*
@ -40,7 +40,7 @@ class DIALOG_SET_GRID : public DIALOG_SET_GRID_BASE
{
public:
DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos );
~DIALOG_SET_GRID() { }
void SetGridSize( const wxRealPoint& grid );
wxRealPoint GetGridSize();
void SetGridUnits( int units );
@ -56,6 +56,7 @@ private:
void OnOkClick( wxCommandEvent& event );
};
void PCB_BASE_FRAME::InstallGridFrame( const wxPoint& pos )
{
DIALOG_SET_GRID dlg( this, pos );
@ -90,8 +91,6 @@ void PCB_BASE_FRAME::InstallGridFrame( const wxPoint& pos )
DIALOG_SET_GRID::DIALOG_SET_GRID( wxWindow* parent, const wxPoint& pos ) :
DIALOG_SET_GRID_BASE( parent )
{
SetFocus();
m_TextPosXUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_TextPosYUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
@ -105,9 +104,10 @@ void DIALOG_SET_GRID::SetGridSize( const wxRealPoint& grid )
{
wxString msg;
msg.Printf( wxT( "%.6f" ), grid.x );
msg.Printf( wxT( "%.10g" ), grid.x );
m_OptGridSizeX->SetValue( msg );
msg.Printf( wxT( "%.6f" ), grid.y );
msg.Printf( wxT( "%.10g" ), grid.y );
m_OptGridSizeY->SetValue( msg );
}
@ -158,6 +158,7 @@ void DIALOG_SET_GRID::SetGridOrigin( const wxPoint& grid )
PutValueInLocalUnits( *m_GridOriginYCtrl, grid.y );
}
void DIALOG_SET_GRID::SetGridForFastSwitching( wxArrayString aGrids, int aGrid1, int aGrid2 )
{
m_comboBoxGrid1->Append( aGrids );
@ -167,6 +168,7 @@ void DIALOG_SET_GRID::SetGridForFastSwitching( wxArrayString aGrids, int aGrid1,
m_comboBoxGrid2->SetSelection( aGrid2 );
}
void DIALOG_SET_GRID::GetGridForFastSwitching( int& aGrid1, int& aGrid2 )
{
aGrid1 = m_comboBoxGrid1->GetSelection();
@ -180,17 +182,13 @@ void DIALOG_SET_GRID::OnResetGridOrgClick( wxCommandEvent& event )
}
/*****************************************************************/
void DIALOG_SET_GRID::OnCancelClick( wxCommandEvent& event )
/*****************************************************************/
{
EndModal( wxID_CANCEL );
}
/*************************************************************************/
void DIALOG_SET_GRID::OnOkClick( wxCommandEvent& event )
/*************************************************************************/
{
EndModal( wxID_OK );
}

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -30,6 +30,7 @@ DIALOG_SET_GRID_BASE::DIALOG_SET_GRID_BASE( wxWindow* parent, wxWindowID id, con
wxFlexGridSizer* fgSizer31;
fgSizer31 = new wxFlexGridSizer( 2, 2, 0, 0 );
fgSizer31->AddGrowableCol( 1 );
fgSizer31->SetFlexibleDirection( wxBOTH );
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );

View File

@ -209,7 +209,7 @@
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols"></property>
<property name="growablecols">1</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// C++ code generated with wxFormBuilder (version Apr 30 2013)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!